From d532d087fea350ce68f20320ef42328189dec83e Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 21 Jun 2020 14:51:10 +0200 Subject: [PATCH] Future-proof Decidim passenger + nginx some more --- lxc-apps/decidim/image | 5 +++-- lxc-apps/decidim/image.d/etc/nginx/nginx.conf | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lxc-apps/decidim/image b/lxc-apps/decidim/image index e6a3ead..4754002 100644 --- a/lxc-apps/decidim/image +++ b/lxc-apps/decidim/image @@ -15,6 +15,7 @@ RUN EOF # Install passenger gem install passenger --no-document + ln -s /usr/local/lib/ruby/gems/2.6.0/gems/passenger-* /usr/local/lib/passenger # Create OS user addgroup -S -g 8080 decidim @@ -22,7 +23,7 @@ RUN EOF # Compile nginx # 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\.]+)') + NGINX_VERSION=$(grep ' PREFERRED_NGINX_VERSION' /usr/local/lib/passenger/src/ruby_supportlib/phusion_passenger.rb | grep -Eo '([0-9\.]+)') cd /tmp wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz tar xf nginx-*.tar.gz @@ -44,7 +45,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-*/src/nginx_module + --add-module=/usr/local/lib/passenger/src/nginx_module make -j $(getconf _NPROCESSORS_ONLN) make install rm -f /etc/nginx/*.default diff --git a/lxc-apps/decidim/image.d/etc/nginx/nginx.conf b/lxc-apps/decidim/image.d/etc/nginx/nginx.conf index 83fe181..885f09f 100644 --- a/lxc-apps/decidim/image.d/etc/nginx/nginx.conf +++ b/lxc-apps/decidim/image.d/etc/nginx/nginx.conf @@ -18,7 +18,7 @@ http { tcp_nodelay on; send_timeout 300; - passenger_root /usr/local/lib/ruby/gems/2.6.0/gems/passenger-6.0.4; + passenger_root /usr/local/lib/passenger; passenger_ruby /usr/local/bin/ruby; server {