mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 14:04:52 +03:00
[fix](docker) add default value if WEB_CONCURRENCY is unset
This commit is contained in:
parent
805ad2480a
commit
9073ef7be0
|
@ -27,6 +27,10 @@ if compress_enabled; then
|
||||||
python /app/manage.py compress
|
python /app/manage.py compress
|
||||||
fi
|
fi
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
# The number of worker processes for handling requests. [default: 4]
|
||||||
|
WEB_CONCURRENCY=${WEB_CONCURRENCY:-4}
|
||||||
|
|
||||||
{%- if cookiecutter.use_async == 'y' %}
|
{%- 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
|
exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 -w $WEB_CONCURRENCY --chdir=/app -k uvicorn.workers.UvicornWorker
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user