mirror of
https://github.com/thecyberlearn/modern-django-starter.git
synced 2026-08-18 10:12:56 +00:00
✨ 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
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
services:
|
|
web:
|
|
build:
|
|
context: .
|
|
target: development
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
volumes:
|
|
- .:/app
|
|
- static_volume:/app/staticfiles
|
|
- media_volume:/app/media
|
|
ports:
|
|
- "8001:8000"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=django_project.settings.development
|
|
|
|
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}
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
|
- static_volume:/app/staticfiles
|
|
- media_volume:/app/media
|
|
depends_on:
|
|
- web
|
|
profiles:
|
|
- production
|
|
|
|
volumes:
|
|
postgres_data:
|
|
static_volume:
|
|
media_volume: |