From: Guillaume Pellerin Date: Mon, 27 Jun 2022 22:48:46 +0000 (+0200) Subject: use a scoket for asgi X-Git-Tag: 2.7.1~31 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c5e8e832ad6452c0319284f48938becd32b02ce3;p=teleforma.git use a scoket for asgi --- diff --git a/app/asgi.sh b/app/asgi.sh index f6409ce5..8025df96 100755 --- a/app/asgi.sh +++ b/app/asgi.sh @@ -6,6 +6,9 @@ manage=$app'/manage.py' static='/srv/static/' media='/srv/media/' src='/srv/src/' +worker=8 +sock=/var/run/app/asgi.sock + if [ "$1" = "--runserver" ]; then python $manage runserver 0.0.0.0:8000 @@ -14,7 +17,7 @@ else # watchmedo shell-command --patterns="$patterns" --recursive \ # --command='python '$manage' collectstatic --noinput' $app & #daphne -b 0.0.0.0 -p 8000 asgi:application - uvicorn asgi:application --host 0.0.0.0 --log-level info --workers 8 --ws websockets + uvicorn asgi:application --uds $sock --log-level info --workers $workers --ws websockets fi