web: use env variables to set worker processes and connections

Use 2 new environment variables to allow setting the number of nginx worker processes and connections. Add the variables to the docker-compose file and to the nginx-conf where default values are also set.
This commit is contained in:
Mark
2020-12-08 18:30:57 -05:00
committed by GitHub
parent 5679578d80
commit 6a4887d7fc
2 changed files with 4 additions and 2 deletions

View File

@@ -1,10 +1,10 @@
user www-data;
worker_processes 4;
worker_processes {{ .Env.NGINX_WORKER_PROCESSES | default "4" }};
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
worker_connections {{ .Env.NGINX_WORKER_CONNECTIONS | default "768" }};
# multi_accept on;
}