Production-ready Django 6.x starter template featuring Docker Compose, Postgres, Redis, Celery, and TailwindCSS integrated with DaisyUI.
- Core: Python 3.14, Django 6.x
- Database & Cache: PostgreSQL 18, Redis 8
- Infrastructure: Docker Compose, Gunicorn + Nginx
- Frontend: TailwindCSS, DaisyUI
- Tooling:
uv(package management), pytest, ruff, mypy - CI/CD: GitHub Actions, strict local/prod environment split (
django-environ)
- Strict Environment Separation: Isolated logic for Local and Production.
- Flawless Docker: No root permission conflicts on Linux/Mac.
uvfor blazing-fast package management. - Fail-Fast Security: Production server refuses to start if
.envis misconfigured. - Nginx & HTTPS Ready: Self-contained proxy, static files cache busting, and easy Certbot renewal.
- Tailwind Hot-Reload: Native integration inside the local container, without messy local dependencies.
- Clone the repository:
git clone git@github.com:ivanitch/django-starter.git django-project
cd django-project- Setup environment variables:
cp .env.example .env- Start the project using Makefile:
make upThis builds images, starts the database, and launches Django + Tailwind watcher.
- Apply migrations and create a superuser::
make migrate
make bash
# Inside container:
python manage.py createsuperuser- View local Logs:
make logs
make logs dbApp runs at: http://localhost:8000
Production operates in strict isolation. It does not rely on the local docker-compose.yml. Node.js and dev packages are stripped from the final image.
- Clone to your VPS:
git clone git@github.com:ivanitch/django-starter.git django-project
cd django-project- Configure Production Settings:
cp .env.prod.example .env.prod
nano .env.prodMake sure to generate a secure SECRET_KEY, set DEBUG=False, update ALLOWED_HOSTS, and set the exact URL in
CSRF_TRUSTED_ORIGINS. Add your domains (DOMAIN, WWW_DOMAIN), CERTBOT_EMAIL, configure PostgreSQL credentials (
POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD), and set up your SMTP email variables.
- 🔒 SSL via Certbot (First Time Setup):
make prod-init-sslThis command will build the prod image, apply migrations, run collectstatic into the Docker volume, and safely restart the web and nginx containers
- Deploy (Zero Downtime)
make prod-deployThis command will build the prod image, apply migrations, run collectstatic into the Docker volume, and safely
restart the web and nginx containers.
- View Production Logs:
make prod-logsDetailed information on CI/CD settings
Detailed deployment instructions for production