Answer the question
In order to leave comments, you need to log in
How to set up a Django ASGI project on Ubuntu?
The project has a chat that uses Django-channels . This chat needs asynchrony (ASGI) to work. I do not use Redis, I use only sockets (reconnecting-websocket), on Windows everything works fine, but in production on Ubuntu everything is much more complicated.
I set everything up with this guide . and everything works well, WSGI is started with Gunicorn and gunicorn.service is created, I also created daphne.service in /etc/systemd/system/
daphne.service
[Unit]
Description=itwork Daphne Service
After=network.target
[Service]
Type=simple
User=luka
WorkingDirectory=/home/luka/itworkdir
ExecStart=/home/luka/itworkdir/env/bin/daphne -u /home/luka/daphne.sock Career.asgi:application -v2
[Install]
WantedBy=multi-user.target
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question