A complete docker package for django which is easy to understand and can be deployed anywhere(supports Data Science related libraries like numpy, scipy etc).
Last updated Jun 16, 2026
480
Stars
124
Forks
0
Issues
0
Stars/day
Attention Score
89
Language breakdown
Python 52.2%
Shell 23.9%
Dockerfile 12.6%
HTML 8.2%
Makefile 3.0%
▸ Files
click to expand
README
Deploy Django using Nginx, Celery, Redis and Postgresql with Docker
A boilerplate to deploy Django with cool stuff. Also serves as an example project from these tutorial:
- Deploy Django, Gunicorn, NGINX, Postgresql using Docker
- Serve Static Files by Nginx from Django using Docker
- Docker: Use Celery in Django(Redis as Broker)
Advantages
- Ready to use with your django project.
- Combined with NGINX, Redis, Celery to handle relevent things.
- Alpine based images are used, so that sizes of the images are compartively low.
- Now comes built it with Numpy, Scipy and Pandas support. So you can integrate your datascience projects with this. Instructions for integrating these libraries are also shared in the
Dockerfile. - With Numpy, Pandas and Scipy dependecies installed, the total size is 657MB(may differ if you have more packages). Without these, size reduces to 390MB.
- Now comes with support to install Pillow using django.
Now Featuring Numpy, Scipy and Pandas
In theDockerfile, there are detailed instructions on how to install data science dependencies.
PS: Here is a gist which is more useful for Numpy, Pandas, Scipy etc. And it is usable with this project's docker-compose.yml file. Just you need to replace the Dockerfile from ./compose directory with the one in the gist.
Basic Usage
- First run
make buildinside root directory. - Then run
make upto start up the project for first time. - Use/update environment variables from
.envsfolder.
Preview
A default Django project resides insrc directory. So, when you start the project, you will see the following screen in 8000 port:

Also when you access the django container log via make log-web, you will see the following:

Commands
To use this project, run this commands:make upto build the project and starting containers.make buildto build the project.make startto start containers if project has been up already.make stopto stop containers.make shell-webto shell access web container.make shell-dbto shell access db container.make shell-nginxto shell access nginx container.make logs-webto log access web container.make logs-dbto log access db container.make logs-nginxto log access nginx container.make collectstaticto put static files in static directory.make log-webto log access web container.make log-dbto log access db container.make log-nginxto log access nginx container.make restartto restart containers.
License
MIT.Contribute
Feel free to fork and create PR.
🔗 More in this category