Hello everyone, I'am looking to deploy Django ASGI project in production.
This is the actual setup. Because Daphne is installed into the project python manage.py runserver use the asgi.py file instead of wsgi.
Si with this config the project run with asgi on port 8000 and wsgi on port 5000.
Is there any big difference using
daphne -b 0.0.0.0 -p 8000 main.asgi:application
Instead of:
python manage.py runserver
[uwsgi]
uid = www-data
gid = www-data
for-readline = /srv/settings.env
env = %(_)
endfor =
plugin = python3
chdir = /var/www/application
module = main.wsgi:application
virtualenv = /srv/env
daemonize = /var/log/uwsgi/uwsgi_worker.log
attach-daemon = sh -c
"cd /var/www/application/ ; source /srv/env/bin/activate && python manage.py runserver 0.0.0.0:8000" attach-daemon = sh -c "cd /var/www/application/ ; source /srv/env/bin/activate && python manage.py qcluster"