feat: run with gunicorn instead of flask

Each worker now uses its own registry instead of the global REGISTRY
to avoid duplicate metric registration, since metrics are served
from the database.
This commit is contained in:
Ana Custura 2024-12-02 14:21:39 +00:00
parent 45823b02e4
commit 0867b13f8f
3 changed files with 17 additions and 7 deletions

4
run_gunicorn.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
flask db upgrade
gunicorn "$FLASK_APP".__init__:app -w "$GUNICORN_WORKERS" --access-logfile=- -b "$GUNICORN_RUN_HOST:$GUNICORN_RUN_PORT"