From c9978e21c9890c93e89cf0ce731f5952c39d5b3e Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 21 Jun 2020 10:45:12 +0200 Subject: [PATCH] Future-proof Decidim passenger + nginx compilation --- lxc-apps/decidim/image | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lxc-apps/decidim/image b/lxc-apps/decidim/image index 9ab0768..e6a3ead 100644 --- a/lxc-apps/decidim/image +++ b/lxc-apps/decidim/image @@ -21,11 +21,12 @@ RUN EOF adduser -S -u 8080 -h /srv/decidim-app -s /sbin/nologin -G decidim -g decidim decidim # Compile nginx - # taken from passenger-install-nginx-module + # Minimized version of /usr/local/bin/passenger-install-nginx-module + NGINX_VERSION=$(grep ' PREFERRED_NGINX_VERSION' /usr/local/lib/ruby/gems/2.6.0/gems/passenger-*/src/ruby_supportlib/phusion_passenger.rb | grep -Eo '([0-9\.]+)') cd /tmp - wget https://nginx.org/download/nginx-1.17.3.tar.gz - tar xf nginx-1.17.3.tar.gz - cd nginx-1.17.3 + wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz + tar xf nginx-*.tar.gz + cd nginx-* ./configure \ --prefix=/var/lib/nginx \ --sbin-path=/usr/sbin/nginx \ @@ -43,7 +44,7 @@ RUN EOF --with-http_stub_status_module \ --with-http_addition_module \ --with-cc-opt=-Wno-error \ - --add-module=/usr/local/lib/ruby/gems/2.6.0/gems/passenger-6.0.4/src/nginx_module + --add-module=/usr/local/lib/ruby/gems/2.6.0/gems/passenger-*/src/nginx_module make -j $(getconf _NPROCESSORS_ONLN) make install rm -f /etc/nginx/*.default