Due to changes in the core (backported to stable) all brotli support
is unconditional.
No need to carry any special logic here.
ENV PG_MAJOR 10
ENV RUBY_ALLOCATOR /usr/lib/libjemalloc.so.1
-ENV COMPRESS_BROTLI 1
#LABEL maintainer="Sam Saffron \"https://twitter.com/samsaffron\""
# 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/service/unicorn/run
chmod: "+x"