Basic Docker Compose template application for orchestating Flask with a Celery queue task, Redis message broker, MySQL database and support for SocketIO protocol.
Deployed with Nginx server and Gunicorn WSGI.
Flower supervision of Celery workers is also available. SocketIO is implemented through Flask-SocketIO.
Note that this application is almost production-ready. To see a production-ready application that follows this template check out CONTRABASS-webservices.
This template is intended for asynchronous tasks, periodical tasks and apps that require asynchronous communication through WebSockets-like protocols. Note that this makes an ideal backend for long-time execution web apps.
Notice that this application is horizontally scalable as it allows replication through multiple nginx, gunicorn, and celery workers.
- Python 🐍 >= 3.6
- Docker 🐳
- Docker compose 🐳
First setup variables on .docker.env
.
Assuming you have Docker and docker-compose installed, run on terminal:
docker-compose up
In order to bring it down run:
docker-compose down
Go to:
-
Flower management page
pytest -v