From: Sam Date: Fri, 26 Jun 2015 02:33:50 +0000 (+1000) Subject: allow nginx logs to be read by the web X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b3d252a031f758ec9ff0218e3382e7e1231321f5;p=discourse_docker.git allow nginx logs to be read by the web --- diff --git a/templates/web.template.yml b/templates/web.template.yml index d0b7519..2ff1483 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -33,6 +33,13 @@ run: # find DISCOURSE_ env vars, strip the leader, lowercase the key /usr/local/bin/ruby -e 'ENV.each{|k,v| puts "#{$1.downcase} = #{v}" if k =~ /^DISCOURSE_(.*)/}' > $conf + - file: + path: /etc/runit/1.d/ensure-web-nginx-read + chmod: "+x" + contents: | + #!/bin/bash + chgrp -R www-data /var/log/nginx + chgrp www-data /var/log/nginx - file: path: /etc/service/unicorn/run chmod: "+x" @@ -199,7 +206,7 @@ run: compress delaycompress notifempty - create 0640 www-data adm + create 0640 www-data www-data sharedscripts postrotate sv 1 nginx