From 401421d31a029af77d890ec6bfc76c7aee8b38e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gru=CC=88ndner?= Date: Wed, 28 Apr 2021 22:55:44 +0200 Subject: [PATCH] change to unpriviliged nginx --- node-rev-proxy/docker-compose.yml | 2 +- node-rev-proxy/nginx.conf | 2 ++ node-rev-proxy/q_nginx_start.sh | 20 -------------------- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100755 node-rev-proxy/q_nginx_start.sh diff --git a/node-rev-proxy/docker-compose.yml b/node-rev-proxy/docker-compose.yml index b8e2b10..6d3f2e1 100644 --- a/node-rev-proxy/docker-compose.yml +++ b/node-rev-proxy/docker-compose.yml @@ -4,7 +4,7 @@ services: nginx-num-node: container_name: nginx-num-node restart: unless-stopped - image: nginx:1.19 + image: nginxinc/nginx-unprivileged:1.20-alpine ports: - "443:443" volumes: diff --git a/node-rev-proxy/nginx.conf b/node-rev-proxy/nginx.conf index e426736..5110b9e 100644 --- a/node-rev-proxy/nginx.conf +++ b/node-rev-proxy/nginx.conf @@ -1,3 +1,5 @@ +pid /tmp/nginx.pid; + events { worker_connections 1024; } diff --git a/node-rev-proxy/q_nginx_start.sh b/node-rev-proxy/q_nginx_start.sh deleted file mode 100755 index 356c1b3..0000000 --- a/node-rev-proxy/q_nginx_start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -ALLOWED_IPS=${ALLOWED_IPS:-""} - -echo $ALLOWED_IPS - -ips=$(echo $ALLOWED_IPS | tr ",'" "\n") - -printf "" > /etc/nginx/conf.d/queue_allow_ips.conf - -for ip in $ips -do - echo "allow $ip;" >> /etc/nginx/conf.d/queue_allow_ips.conf -done - -if [[ -n $ALLOWED_IPS ]];then - echo "deny all;" >> /etc/nginx/conf.d/queue_allow_ips.conf -fi - -#starting nginx -nginx -g 'daemon off;'