From: Sam Date: Thu, 16 Apr 2015 01:30:37 +0000 (+1000) Subject: FIX: broken nginx log file rotation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d256035c6c2c8685b8735141539c7e3bf835a74;p=discourse_docker.git FIX: broken nginx log file rotation --- diff --git a/templates/web.template.yml b/templates/web.template.yml index c094b7a..c40452e 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -189,15 +189,22 @@ run: endscript } - - replace: - filename: "/etc/logrotate.d/nginx" - from: "weekly" - to: "daily" - - - replace: - filename: "/etc/logrotate.d/nginx" - from: "52" - to: "14" + - file: + path: /etc/logrotate.d/nginx + contents: | + /var/log/nginx/*.log { + daily + missingok + rotate 14 + compress + delaycompress + notifempty + create 0640 www-data adm + sharedscripts + postrotate + sv 1 nginx + endscript + } # move state out of the container this fancy is done to support rapid rebuilds of containers, # we store anacron and logrotate state outside the container to ensure its maintained across builds