Working Django Chat project with Daphne Channels, Redis and MySQL. Dockerized!
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/daphne/
https://channels.readthedocs.io/en/stable/
It's just an adaptation of this tutorial:
https://channels.readthedocs.io/en/stable/tutorial/part_3.html
docker compose build
The first time or everytime you want to rebuild the container
docker compose up
Just run the container
You may also execute it locally by creating a local environment:
virtualenv .venv
.venv\Scripts\activate.bat (for windows)
pip install -r requirements.txt
then execute the docker, stop the Daphne service and run the server locally.
The rest of the services will be pulled from the container.