Switch to Gunicorn

This commit is contained in:
Keannu Bernasol 2024-09-15 00:49:30 +08:00
parent 97bcf6295b
commit 8de2c6936b
2 changed files with 3 additions and 1 deletions

View file

@ -107,3 +107,4 @@ websockets==12.0; python_version >= '3.8'
whitenoise==6.6.0
wsproto==1.2.0; python_full_version >= '3.7.0'
zope-interface==6.3; python_version >= '3.7'
gunicorn==22.0.0

View file

@ -13,7 +13,8 @@ if [ "$RUN_TYPE" = "web" ]; then
if [ "$BACKEND_DEBUG" = 'True' ]; then
python manage.py runserver "0.0.0.0:8000"
else
python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application
gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application
# python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application
fi
elif [ "$RUN_TYPE" = "worker" ]; then
celery -A config worker -l INFO -E --concurrency 1