From c5e8e832ad6452c0319284f48938becd32b02ce3 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 28 Jun 2022 00:48:46 +0200 Subject: [PATCH] use a scoket for asgi --- app/asgi.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5