Skip to content

Commit 257fca1

Browse files
committed
Implement USE_NGINX_WORKER_PROCESSES
1 parent 30d01a7 commit 257fca1

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

python2.7-alpine3.7/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
55
# Generate Nginx config for maximum upload file size
66
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
77

8+
# Get the number of workers for Nginx, default to 1
9+
USE_NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
10+
# Modify the number of worker processes in Nginx config
11+
sed -i "/worker_processes\s/c\worker_processes ${USE_NGINX_WORKER_PROCESSES};" /etc/nginx/nginx.conf
12+
813
# Get the URL for static files from the environment variable
914
USE_STATIC_URL=${STATIC_URL:-'/static'}
1015
# Get the absolute path of the static files from the environment variable

python2.7/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
55
# Generate Nginx config for maximum upload file size
66
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
77

8+
# Get the number of workers for Nginx, default to 1
9+
USE_NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
10+
# Modify the number of worker processes in Nginx config
11+
sed -i "/worker_processes\s/c\worker_processes ${USE_NGINX_WORKER_PROCESSES};" /etc/nginx/nginx.conf
12+
813
# Get the URL for static files from the environment variable
914
USE_STATIC_URL=${STATIC_URL:-'/static'}
1015
# Get the absolute path of the static files from the environment variable

python3.5/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
55
# Generate Nginx config for maximum upload file size
66
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
77

8+
# Get the number of workers for Nginx, default to 1
9+
USE_NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
10+
# Modify the number of worker processes in Nginx config
11+
sed -i "/worker_processes\s/c\worker_processes ${USE_NGINX_WORKER_PROCESSES};" /etc/nginx/nginx.conf
12+
813
# Get the URL for static files from the environment variable
914
USE_STATIC_URL=${STATIC_URL:-'/static'}
1015
# Get the absolute path of the static files from the environment variable

python3.6-alpine3.7/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
55
# Generate Nginx config for maximum upload file size
66
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
77

8+
# Get the number of workers for Nginx, default to 1
9+
USE_NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
10+
# Modify the number of worker processes in Nginx config
11+
sed -i "/worker_processes\s/c\worker_processes ${USE_NGINX_WORKER_PROCESSES};" /etc/nginx/nginx.conf
12+
813
# Get the URL for static files from the environment variable
914
USE_STATIC_URL=${STATIC_URL:-'/static'}
1015
# Get the absolute path of the static files from the environment variable

python3.6/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
55
# Generate Nginx config for maximum upload file size
66
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
77

8+
# Get the number of workers for Nginx, default to 1
9+
USE_NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
10+
# Modify the number of worker processes in Nginx config
11+
sed -i "/worker_processes\s/c\worker_processes ${USE_NGINX_WORKER_PROCESSES};" /etc/nginx/nginx.conf
12+
813
# Get the URL for static files from the environment variable
914
USE_STATIC_URL=${STATIC_URL:-'/static'}
1015
# Get the absolute path of the static files from the environment variable

0 commit comments

Comments
 (0)