mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-16 01:44:51 +03:00
chore: ensure pid is 1 for better signal handling at prod/local
This commit is contained in:
parent
db3edf1e70
commit
f2f8cb6964
|
@ -5,4 +5,4 @@ set -o nounset
|
|||
|
||||
|
||||
rm -f './celerybeat.pid'
|
||||
celery -A config.celery_app beat -l INFO
|
||||
exec celery -A config.celery_app beat -l INFO
|
||||
|
|
|
@ -4,7 +4,7 @@ set -o errexit
|
|||
set -o nounset
|
||||
|
||||
|
||||
celery \
|
||||
exec celery \
|
||||
-A config.celery_app \
|
||||
-b "${CELERY_BROKER_URL}" \
|
||||
flower \
|
||||
|
|
|
@ -4,4 +4,4 @@ set -o errexit
|
|||
set -o nounset
|
||||
|
||||
|
||||
watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO'
|
||||
exec watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO'
|
||||
|
|
|
@ -9,5 +9,5 @@ python manage.py migrate
|
|||
{%- if cookiecutter.use_async == 'y' %}
|
||||
uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html'
|
||||
{%- else %}
|
||||
python manage.py runserver_plus 0.0.0.0:8000
|
||||
exec python manage.py runserver_plus 0.0.0.0:8000
|
||||
{%- endif %}
|
||||
|
|
|
@ -4,4 +4,4 @@ set -o errexit
|
|||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
make livehtml
|
||||
exec make livehtml
|
||||
|
|
|
@ -28,7 +28,7 @@ if compress_enabled; then
|
|||
fi
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' %}
|
||||
/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 --chdir=/app -k uvicorn.workers.UvicornWorker
|
||||
{%- else %}
|
||||
/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 --chdir=/app
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user