mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-27 16:26:50 +01:00
feat: add env var for number of nginx unit worker processes (#22567)
add env var for number of nginx unit worker processes i suspect that with asgi we'll be better off with 1 instead of 4 worker processes - i'd like us to be able to test this per deployment via an env var
This commit is contained in:
parent
b547d4ad59
commit
87cfc3fae4
@ -12,6 +12,7 @@ trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT
|
|||||||
export PROMETHEUS_METRICS_EXPORT_PORT=8001
|
export PROMETHEUS_METRICS_EXPORT_PORT=8001
|
||||||
export STATSD_PORT=${STATSD_PORT:-8125}
|
export STATSD_PORT=${STATSD_PORT:-8125}
|
||||||
export NGINX_UNIT_PYTHON_PROTOCOL=${NGINX_UNIT_PYTHON_PROTOCOL:-wsgi}
|
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
|
envsubst < /docker-entrypoint.d/unit.json.tpl > /docker-entrypoint.d/unit.json
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"applications": {
|
"applications": {
|
||||||
"posthog": {
|
"posthog": {
|
||||||
"type": "python 3.10",
|
"type": "python 3.10",
|
||||||
"processes": 4,
|
"processes": $NGINX_UNIT_APP_PROCESSES,
|
||||||
"working_directory": "/code",
|
"working_directory": "/code",
|
||||||
"path": ".",
|
"path": ".",
|
||||||
"module": "posthog.$NGINX_UNIT_PYTHON_PROTOCOL",
|
"module": "posthog.$NGINX_UNIT_PYTHON_PROTOCOL",
|
||||||
|
Loading…
Reference in New Issue
Block a user