modern-django-starter/docker-compose.prod.yml
Django Template 4bbc56a08f Initial commit: Django boilerplate with authentication, Docker, and Dokploy support
 Features:
- Complete Django project with authentication
- Email/password and social login (Google, Facebook)
- Role-based access control (admin, staff, user)
- Docker and Docker Compose setup
- Production-ready configuration
- Static file handling with WhiteNoise
- PostgreSQL database integration
- Comprehensive documentation
- GitHub CI/CD workflows
- Dokploy deployment configuration

🚀 Ready for deployment on Dokploy, Heroku, Railway, and other platforms
2025-09-11 09:36:55 +05:30

51 lines
1.1 KiB
YAML

services:
web:
build:
context: .
target: production
command: >
sh -c "chmod +x /app/entrypoint.sh &&
/app/entrypoint.sh &&
gunicorn --bind 0.0.0.0:8000 --workers 3 django_project.wsgi:application"
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/media
expose:
- 8000
env_file:
- .env
depends_on:
- db
- redis
environment:
- DJANGO_SETTINGS_MODULE=django_project.settings.production
db:
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${DB_NAME:-django_db}
- POSTGRES_USER=${DB_USER:-django_user}
- POSTGRES_PASSWORD=${DB_PASSWORD:-django_password}
redis:
image: redis:7-alpine
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.prod.conf:/etc/nginx/conf.d/default.conf
- static_volume:/app/staticfiles
- media_volume:/app/media
- ./ssl:/etc/nginx/ssl
depends_on:
- web
volumes:
postgres_data:
static_volume:
media_volume: