Future-proof Decidim passenger + nginx some more

This commit is contained in:
Disassembler 2020-06-21 14:51:10 +02:00
parent bbc669d2a7
commit d532d087fe
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ RUN EOF
# Install passenger # Install passenger
gem install passenger --no-document gem install passenger --no-document
ln -s /usr/local/lib/ruby/gems/2.6.0/gems/passenger-* /usr/local/lib/passenger
# Create OS user # Create OS user
addgroup -S -g 8080 decidim addgroup -S -g 8080 decidim
@ -22,7 +23,7 @@ RUN EOF
# Compile nginx # Compile nginx
# Minimized version of /usr/local/bin/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\.]+)') NGINX_VERSION=$(grep ' PREFERRED_NGINX_VERSION' /usr/local/lib/passenger/src/ruby_supportlib/phusion_passenger.rb | grep -Eo '([0-9\.]+)')
cd /tmp cd /tmp
wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar xf nginx-*.tar.gz tar xf nginx-*.tar.gz
@ -44,7 +45,7 @@ RUN EOF
--with-http_stub_status_module \ --with-http_stub_status_module \
--with-http_addition_module \ --with-http_addition_module \
--with-cc-opt=-Wno-error \ --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 -j $(getconf _NPROCESSORS_ONLN)
make install make install
rm -f /etc/nginx/*.default rm -f /etc/nginx/*.default

View File

@ -18,7 +18,7 @@ http {
tcp_nodelay on; tcp_nodelay on;
send_timeout 300; 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; passenger_ruby /usr/local/bin/ruby;
server { server {