From e0906e9a870ff41400cc7ac935de4ea953209142 Mon Sep 17 00:00:00 2001 From: Nicolas Marcq Date: Wed, 20 Nov 2024 16:02:02 +0100 Subject: [PATCH] Add multiple workers to gunicorn --- docker/entrypoint.sh | 2 +- docker/environment_variables/squest.env | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 2f56e81b0..29ad6e697 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -13,4 +13,4 @@ echo "Inserting default data" python manage.py insert_default_data echo "Starting web server" -gunicorn --bind 0.0.0.0:8000 --pythonpath /app/squest Squest.wsgi +gunicorn --bind 0.0.0.0:8000 --workers ${GUNICORN_WORKERS:-4} --pythonpath /app/squest Squest.wsgi diff --git a/docker/environment_variables/squest.env b/docker/environment_variables/squest.env index 1a208afd7..851fa86e8 100644 --- a/docker/environment_variables/squest.env +++ b/docker/environment_variables/squest.env @@ -33,3 +33,5 @@ REDIS_CACHE_HOST=redis-cache WAIT_HOSTS=db:3306,rabbitmq:5672 WAIT_TIMEOUT=60 + +GUNICORN_WORKERS=4