Dockerize A Django Application With PostgreSQL, Celery, Redis and Flower
Welcome to this 5-part video series where we dive into creating a robust Django application, powered by a modern stack and containerized with Docker. We'll guide you through setting up a development environment with:
- PostgreSQL as the database
- Gunicorn as the web server
- Celery for task queue management
- Redis as the message broker
- Flower for monitoring Celery tasks
Using Docker Compose, we’ll bundle these components into a cohesive, easy-to-deploy environment. This setup simplifies development and ensures your app is ready to scale with a single command.
Introduction And Project Set Up
In this part of our series, we introduce an easy setup process and guide you through starting the simple Django project. We create the web application component, then Dockerize it and run it as a container.
Set Up Django & PostgreSQL using Docker Compose
Next, we integrate PostgreSQL as our database and introduce Docker Compose to manage multiple containers. We’ll also preview the four additional services we’ll set up, connect to the database, create tables, and run Django migrations.
Add Celery Background Tasks With Redis
Here, we add Celery for background task processing, configure it with a Redis container, and set up a dedicated Celery service to handle tasks efficiently.
Running Celery Background Tasks In Django
This part focuses on resolving minor issues from the previous section, ensuring our background tasks run smoothly.
Monitor Celery Tasks With Flower
In this final part of our series, we add Flower, a monitoring dashboard for Celery tasks, which lets us track the status of Celery, view tasks, and check the results of tasks executed in the Task Queue. We also introduce Docker Compose Watch, a tool that streamlines our development workflow by syncing changes from our host machine to the Docker file system, enabling seamless updates.
Just In case you find any of my work helpful and you can support it, consider doing so over on
Thanks for visiting, Happy Coding