modern-django-starter/docker-compose.dokploy.yml
Django Template 07dd7b0e47 Add comprehensive Dokploy deployment configuration and guide
## New Files Added:
- **docker-compose.dokploy.yml** - Dokploy-optimized compose file with:
  - dokploy-network integration for all services
  - Traefik labels for SSL and domain routing
  - Persistent volumes using ../files/ directory
  - Production-ready Django, PostgreSQL, and Redis configuration

- **DOKPLOY.md** - Complete step-by-step deployment guide including:
  - 10-step deployment process with exact form fields
  - Domain configuration and DNS setup
  - Environment variables for production
  - Post-deployment Django setup commands
  - Comprehensive troubleshooting section
  - Production checklist and monitoring guidance

## Key Features:
- **Production-ready** configuration with SSL certificates
- **Persistent data** storage across deployments
- **Detailed troubleshooting** for common issues
- **Copy-paste configurations** for immediate use
- **Security best practices** implemented

This enables one-click deployment of the Django template on any Dokploy server with professional-grade configuration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:46:12 +05:30

51 lines
1.3 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:
- "../files/static:/app/staticfiles"
- "../files/media:/app/media"
expose:
- 8000
env_file:
- .env
depends_on:
- db
- redis
environment:
- DJANGO_SETTINGS_MODULE=django_project.settings.production
networks:
- dokploy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.django-app.rule=Host(`your-domain.com`)"
- "traefik.http.routers.django-app.entrypoints=websecure"
- "traefik.http.routers.django-app.tls.certResolver=letsencrypt"
- "traefik.http.services.django-app.loadbalancer.server.port=8000"
db:
image: postgres:15-alpine
volumes:
- "../files/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}
networks:
- dokploy-network
redis:
image: redis:7-alpine
volumes:
- "../files/redis_data:/data"
networks:
- dokploy-network
networks:
dokploy-network:
external: true