From 9073ef7be003a170efd39cf5d8c887652da20817 Mon Sep 17 00:00:00 2001 From: areski Date: Fri, 7 Jun 2024 10:04:24 +0200 Subject: [PATCH] [fix](docker) add default value if WEB_CONCURRENCY is unset --- {{cookiecutter.project_slug}}/compose/production/django/start | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/start b/{{cookiecutter.project_slug}}/compose/production/django/start index 3a297bbd8..74108c5e0 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/start @@ -27,6 +27,10 @@ if compress_enabled; then python /app/manage.py compress fi {%- endif %} + +# The number of worker processes for handling requests. [default: 4] +WEB_CONCURRENCY=${WEB_CONCURRENCY:-4} + {%- if cookiecutter.use_async == 'y' %} exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 -w $WEB_CONCURRENCY --chdir=/app -k uvicorn.workers.UvicornWorker {%- else %}