diff --git a/docker/4_run/apache-logrotate.conf b/docker/4_run/apache-logrotate.conf new file mode 100644 index 0000000..d7d2e6e --- /dev/null +++ b/docker/4_run/apache-logrotate.conf @@ -0,0 +1,21 @@ +/var/log/apache2/*.log { + daily + missingok + rotate 14 + size 100M + compress + delaycompress + notifempty + create 640 root adm + sharedscripts + postrotate + if /etc/init.d/apache2 status > /dev/null ; then \ + /etc/init.d/apache2 reload > /dev/null; \ + fi; + endscript + prerotate + if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ + run-parts /etc/logrotate.d/httpd-prerotate; \ + fi; \ + endscript +} diff --git a/docker/4_run/run.docker b/docker/4_run/run.docker index cd71bfb..9a1bb76 100755 --- a/docker/4_run/run.docker +++ b/docker/4_run/run.docker @@ -42,6 +42,7 @@ RUN a2enmod rewrite && a2enmod wsgi-py36 ADD apache2.conf /etc/apache2/apache2.conf ADD 000-default.conf /etc/apache2/sites-available/000-default.conf +ADD apache-logrotate.conf /etc/logrotate.d/apache2 ADD *.sh / # Remove some empty top-level directories we won't use anyway.