diff --git a/bin/docker-server-unit b/bin/docker-server-unit index 52d8057271d..9d2a8592cd5 100755 --- a/bin/docker-server-unit +++ b/bin/docker-server-unit @@ -12,6 +12,7 @@ trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT export PROMETHEUS_METRICS_EXPORT_PORT=8001 export STATSD_PORT=${STATSD_PORT:-8125} export NGINX_UNIT_PYTHON_PROTOCOL=${NGINX_UNIT_PYTHON_PROTOCOL:-wsgi} +export NGINX_UNIT_APP_PROCESSES=${NGINX_UNIT_APP_PROCESSES:-4} envsubst < /docker-entrypoint.d/unit.json.tpl > /docker-entrypoint.d/unit.json diff --git a/unit.json.tpl b/unit.json.tpl index 656a0892a01..ef1ba4b3ffe 100644 --- a/unit.json.tpl +++ b/unit.json.tpl @@ -40,7 +40,7 @@ "applications": { "posthog": { "type": "python 3.10", - "processes": 4, + "processes": $NGINX_UNIT_APP_PROCESSES, "working_directory": "/code", "path": ".", "module": "posthog.$NGINX_UNIT_PYTHON_PROTOCOL",