Confetti
The way to start a Django project with Docker and docker-compose
Install / Use
/learn @funnydman/ConfettiREADME
CONFETTI
<p align="center"> <img src="https://preview.ibb.co/eDU9Zd/conf.png"></p>The way to start a Django project with Docker
Technology Stack
- Docker v20.x
- Docker-compose v1.28
- Django v3.x
Getting Started
Development
-
Clone this git repository to your local machine.
-
Install
dockeranddocker-composeusing official documentation. -
Add user to the docker group to run commands without sudo:
sudo usermod -aG docker $USER
-
Update settings in
dev.envandconfetti/settings/prod.py(recommended). -
Go to the project root and run:
docker-compose up
- Create Django superuser in the container(in the second shell):
docker-compose exec web python manage.py createsuperuser
- Run tests(optional):
docker-compose exec web python manage.py test
- Navigate to
http://localhost:8000/.
Production
-
Create and fill
.envandconfetti/settings/prod.py. -
Run application:
docker-compose -f docker-compose.prod.yml up
-
Generate certificates(see next section).
-
Navigate to
https://localhost/.
Tips
How to generate ssl certificates? Follow this guide.
The simplest way with less headaches:
- ssh to the server and go to the project root, assume that you configured domains properly:
docker-compose -f docker-compose.prod.yml exec nginx sh
- Install certbot:
apk update && apk add certbot certbot-nginx
- Generate certificates, we use volumes so we don't need to copy certs manually, don't forget to commit them or even better exclude them from git tracking:
certbot certonly --nginx # follow instructions
- Update data in
deployment/nginx/app.conf, and then:
docker-compose -f docker-compose.prod.yml up --build
Ad Hoc docker/docker-compose commands (put in .bash_aliases):
alias dcubn=docker-compose build --no-cache
alias dcub=docker-compose up --build
alias dcu=docker-compose up
⭐️ Thanks everyone who has starred the project, it means a lot!
Happy coding :blush:
Related Skills
node-connect
331.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
prose
331.2kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
claude-opus-4-5-migration
81.5kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
81.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
