mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
Switch to Gunicorn
This commit is contained in:
parent
97bcf6295b
commit
8de2c6936b
2 changed files with 3 additions and 1 deletions
|
@ -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
|
3
start.sh
3
start.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue