From 6bcef8334e286a29f34fe63777aec9cfc3733ec0 Mon Sep 17 00:00:00 2001 From: sadnub Date: Sun, 14 Aug 2022 10:26:52 -0400 Subject: [PATCH] fix nginx entypoint --- docker/containers/tactical-nginx/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/containers/tactical-nginx/entrypoint.sh b/docker/containers/tactical-nginx/entrypoint.sh index dd95b661..dcbf606f 100644 --- a/docker/containers/tactical-nginx/entrypoint.sh +++ b/docker/containers/tactical-nginx/entrypoint.sh @@ -35,8 +35,8 @@ nginxdefaultconf='/etc/nginx/nginx.conf' # increase default nginx worker connections /bin/bash -c "sed -i 's/worker_connections.*/worker_connections ${WORKER_CONNECTIONS};/g' $nginxdefaultconf" -sed -i '1s/^/worker_rlimit_nofile 1000000;\ -/' $nginxdefaultconf +sed -e '/worker_processes.*/a\' -e 'worker_rlimit_nofile 1000000' "${nginxdefaultconf}" +grep -q -e 'worker_rlimit_nofile' "${nginxdefaultconf}" || sed -e '/worker_processes.*/a\' -e 'worker_rlimit_nofile 1000000' "${nginxdefaultconf}" if [[ $DEV -eq 1 ]]; then API_NGINX="