Skip to content

Commit

Permalink
Add worker_connections to nginx config template. Override with `NGI…
Browse files Browse the repository at this point in the history
…NX_WORKER_CONNECTIONS` env var.
  • Loading branch information
mrmachine committed Apr 19, 2020
1 parent c58ad0c commit 78fc912
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ixc_django_docker/bin/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fi
export NGINX_BASIC_AUTH="${NGINX_BASIC_AUTH:-}"
export NGINX_PORT="${NGINX_PORT:-8000}"
export NGINX_PROXY_PORT="${NGINX_PROXY_PORT:-8080}"
export NGINX_WORKER_CONNECTIONS="${NGINX_WORKER_CONNECTIONS:-512}"
export NGINX_WORKER_PROCESSES="${NGINX_WORKER_PROCESSES:-1}"
export SUPERVISOR_PROGRAM_NUMPROCS="${SUPERVISOR_PROGRAM_NUMPROCS:-1}"

Expand Down
4 changes: 3 additions & 1 deletion ixc_django_docker/etc/nginx.tmpl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ daemon off;

# error_log /dev/stderr; # Set by global configuration directive in `nginx.sh`. See: https://stackoverflow.com/a/24423319

events {}
events {
worker_connections {{ .Env.NGINX_WORKER_CONNECTIONS }};
}

http {
access_log /dev/stdout;
Expand Down

0 comments on commit 78fc912

Please sign in to comment.