From c4dff2afb6fe5bb3758a999dd5bfeaac563916d4 Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 3 Apr 2024 17:59:33 +0200 Subject: [PATCH] devicehub entrypoint: put one worker --- docker/devicehub.entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/devicehub.entrypoint.sh b/docker/devicehub.entrypoint.sh index 631c12d1..2824d05d 100755 --- a/docker/devicehub.entrypoint.sh +++ b/docker/devicehub.entrypoint.sh @@ -214,7 +214,8 @@ main() { # 17. Use gunicorn # thanks https://akira3030.github.io/formacion/articulos/python-flask-gunicorn-docker.html if [ "${DEPLOYMENT:-}" = "PROD" ]; then - gunicorn --access-logfile - --error-logfile - --workers 4 -b :5000 app:app + # TODO workers 1 because we have a shared secret in RAM + gunicorn --access-logfile - --error-logfile - --workers 1 -b :5000 app:app else # run development server FLASK_DEBUG=1 flask run --host=0.0.0.0 --port 5000