From: Sam Date: Tue, 7 Jun 2016 08:24:17 +0000 (+1000) Subject: shift enable brotli to boot, it is more correct there X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f132a63566dd19a5a0757e9f6e457683e4f975c3;p=discourse_docker.git shift enable brotli to boot, it is more correct there --- diff --git a/templates/web.template.yml b/templates/web.template.yml index f6aa060..fdd8de8 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -50,6 +50,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/enable-brotli + chmod: "+x" + contents: | + #!/bin/bash + [ ! -z "$COMPRESS_BROTLI" ] && sed -i "s/. brotli/ brotli/" /etc/nginx/conf.d/discourse.conf || sed -i "s/. brotli/# brotli/" /etc/nginx/conf.d/discourse.conf + - file: path: /etc/runit/1.d/ensure-web-nginx-read chmod: "+x" @@ -118,7 +125,6 @@ run: - "cp $home/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf" - "rm /etc/nginx/sites-enabled/default" - "mkdir -p /var/nginx/cache" - - '/bin/bash -c ''([ ! -z "$COMPRESS_BROTLI"] && sed -i "s/# brotli/brotli/" /etc/nginx/conf.d/discourse.conf) || exit 0''' - replace: filename: /etc/nginx/nginx.conf