0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00
posthog/unit.json.tpl
Frank Hamand 87cfc3fae4
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
2024-05-29 12:01:09 +01:00

63 lines
1.5 KiB
Smarty

{
"settings": {
"http": {
"max_body_size": 22020096
}
},
"listeners": {
"*:8000": {
"pass": "applications/posthog"
},
"*:8001": {
"pass": "routes/metrics"
},
"*:8181": {
"pass": "routes/status"
}
},
"routes": {
"metrics": [
{
"match": {
"uri": ["/metrics"]
},
"action": {
"pass": "applications/metrics"
}
}
],
"status": [
{
"match": {
"uri": ["/status"]
},
"action": {
"proxy": "http://unix:/var/run/control.unit.sock"
}
}
]
},
"applications": {
"posthog": {
"type": "python 3.10",
"processes": $NGINX_UNIT_APP_PROCESSES,
"working_directory": "/code",
"path": ".",
"module": "posthog.$NGINX_UNIT_PYTHON_PROTOCOL",
"protocol": "$NGINX_UNIT_PYTHON_PROTOCOL",
"user": "nobody",
"limits": {
"requests": 7500
}
},
"metrics": {
"type": "python 3.10",
"processes": 1,
"working_directory": "/code/bin",
"path": ".",
"module": "unit_metrics",
"user": "nobody"
}
}
}