1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 03:08:52 +02:00

Run ASGI server instead of WSGI

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2023-03-22 11:45:56 +01:00
parent 1d81213773
commit f3d611913e
3 changed files with 22 additions and 2 deletions

View File

@ -8,7 +8,20 @@ python manage.py loaddata initial
nginx
if [ "$TFJM_STAGE" = "prod" ]; then
gunicorn -b 0.0.0.0:8000 --workers=2 --threads=4 --worker-class=gthread tfjm.wsgi --access-logfile '-' --error-logfile '-';
gunicorn -b 0.0.0.0:8000 \
--workers=2 \
--threads=4 \
--worker-class=uvicorn.workers.UvicornWorker \
tfjm.asgi \
--access-logfile '-' \
--error-logfile '-'
else
python manage.py runserver 0.0.0.0:8000;
gunicorn -b 0.0.0.0:8000 \
--workers=2 \
--threads=4 \
--worker-class=uvicorn.workers.UvicornWorker \
tfjm.asgi \
--access-logfile '-' \
--error-logfile '-' \
--reload
fi