From f132a63566dd19a5a0757e9f6e457683e4f975c3 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 7 Jun 2016 18:24:17 +1000 Subject: [PATCH] shift enable brotli to boot, it is more correct there --- templates/web.template.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.25.1