[fix](docker) honor env variable WEB_CONCURRENCY when running gunicorn

This commit is contained in:
areski 2024-06-07 09:54:24 +02:00
parent db38d8b00f
commit 805ad2480a

View File

@ -28,7 +28,7 @@ if compress_enabled; then
fi fi
{%- endif %} {%- endif %}
{%- if cookiecutter.use_async == 'y' %} {%- if cookiecutter.use_async == 'y' %}
exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 -w $WEB_CONCURRENCY --chdir=/app -k uvicorn.workers.UvicornWorker
{%- else %} {%- else %}
exec /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app exec /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 -w $WEB_CONCURRENCY --chdir=/app
{%- endif %} {%- endif %}