From 9dc3c98587d4b67b35831188eae5640e95fc676a Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Fri, 8 Jul 2022 14:45:09 +0000 Subject: [PATCH] Root Commit Signed-off-by: baalajimaestro --- Dockerfile | 5 +++++ archive-cron.sh | 3 +++ crontab-file | 3 +++ schedule-cron.sh | 3 +++ supervisord.conf | 22 ++++++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 Dockerfile create mode 100644 archive-cron.sh create mode 100644 crontab-file create mode 100644 schedule-cron.sh create mode 100644 supervisord.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b8ee8c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM matomo + +RUN rm /var/log/apache2/access.log && mkdir /var/log/supervisord /var/run/supervisord +RUN ln -s /dev/null /var/log/apache2/access.log + diff --git a/archive-cron.sh b/archive-cron.sh new file mode 100644 index 0000000..0f70e34 --- /dev/null +++ b/archive-cron.sh @@ -0,0 +1,3 @@ +#! /bin/bash +docker exec --user www-data matomo /usr/local/bin/php /var/www/html/console core:archive --url=https://counter.baalajimaestro.me/ + diff --git a/crontab-file b/crontab-file new file mode 100644 index 0000000..c0a37ea --- /dev/null +++ b/crontab-file @@ -0,0 +1,3 @@ +0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/php /var/www/html/console core:archive --url="https://counter.baalajimaestro.me/" +0,20,40 * * * * /usr/local/bin/php /var/www/html/console "scheduled-tasks:run" + diff --git a/schedule-cron.sh b/schedule-cron.sh new file mode 100644 index 0000000..d81ccae --- /dev/null +++ b/schedule-cron.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +docker exec --user www-data matomo /usr/local/bin/php /var/www/html/console scheduled-tasks:run diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..4279d54 --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,22 @@ +[supervisord] +nodaemon=true +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB ; maximum size of logfile before rotation +logfile_backups=10 ; number of backed up logfiles +loglevel=error + +[program:apache] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apache2-foreground + +#[program:cron] +#stdout_logfile=/dev/stdout +#stdout_logfile_maxbytes=0 +#stderr_logfile=/dev/stderr +#stderr_logfile_maxbytes=0 +#command=cron -f