Switch the web UI from Werkzeug's built-in server to Gunicorn for a more stable production deployment path. Keep a separate dev config so local runs still reload quickly, while the production path uses a dedicated WSGI entrypoint and cleaner startup behavior. The main motivation is to reduce the websocket teardown noise and make the server behavior more predictable under the app's mostly background-driven workload.
14 lines
316 B
Python
14 lines
316 B
Python
"""Gunicorn configuration for production deployments."""
|
|
|
|
bind = "0.0.0.0:8008"
|
|
worker_class = "gthread"
|
|
workers = 1
|
|
threads = 8
|
|
|
|
# Keep requests from hanging forever on slow external services.
|
|
timeout = 120
|
|
|
|
# Logging goes to stdout/stderr so Docker can collect it.
|
|
accesslog = "-"
|
|
errorlog = "-"
|
|
loglevel = "info"
|