feat: serve app with gunicorn

This commit is contained in:
Christian Krakau-Louis
2026-05-17 16:45:19 +02:00
parent 567159ed29
commit ae8ec413d3
4 changed files with 20 additions and 5 deletions
+13 -2
View File
@@ -23,7 +23,18 @@ case "${FLASK_DEBUG,,}" in
exec python -m flask run --host=0.0.0.0 --port=5000 --reload --debug
;;
*)
echo "Starting Flask application server..."
exec python run.py
: "${GUNICORN_BIND:=0.0.0.0:5000}"
: "${GUNICORN_WORKERS:=2}"
: "${GUNICORN_THREADS:=4}"
: "${GUNICORN_TIMEOUT:=120}"
echo "Starting Gunicorn application server..."
exec gunicorn \
--bind "$GUNICORN_BIND" \
--workers "$GUNICORN_WORKERS" \
--threads "$GUNICORN_THREADS" \
--timeout "$GUNICORN_TIMEOUT" \
--access-logfile - \
--error-logfile - \
wsgi:app
;;
esac