Deployment Overview
Django-CFG supports multiple deployment strategies to fit your infrastructure needs.
π³ Docker (Recommended)
Best for: Modern cloud deployments, microservices, consistent environments
Complete Docker deployment guide: Docker Setup Guide β
Whatβs Included
- β Development and production Docker Compose configurations
- β Multi-service architecture (Django, PostgreSQL, Redis, Workers)
- β Automated health checks and service dependencies
- β Configuration via YAML files and environment variables
- β Build optimization for minimal image sizes
- β Comprehensive troubleshooting guide
Quick Links
- Development Setup - Local Docker environment
- Production Setup - Production-ready deployment
- Configuration Strategy - YAML + env vars
- Build Optimization - Performance tips
- Troubleshooting - Common issues
βοΈ Cloud Platforms
AWS
- ECS/Fargate: Container orchestration (use Docker setup)
- Elastic Beanstalk: Platform-as-a-Service
- EC2: Traditional virtual machines
Guide: Coming soon
Google Cloud
- Cloud Run: Serverless containers (use Docker setup)
- GKE: Kubernetes cluster
- Compute Engine: Virtual machines
Guide: Coming soon
Azure
- Azure Container Instances: Simple container deployment
- AKS: Azure Kubernetes Service
- App Service: Platform-as-a-Service
Guide: Coming soon
π Traditional Deployment
VPS/Dedicated Servers
Requirements:
- Python 3.12+
- PostgreSQL 15+
- Redis 7+
- Nginx/Apache (reverse proxy)
Basic setup:
# Install Django-CFG
pip install django-cfg
# Configure settings
# See Configuration Guide for details
# Run with gunicorn
gunicorn api.wsgi:application
# Start ReArq workers
rearq main:rearq workerRecommended guides:
- Environment Setup - Environment variables
- Security Settings - Production security
- Logging Configuration - Structured logs
π§ Infrastructure Components
All deployment methods require:
Database
- PostgreSQL - Primary database (recommended)
- MySQL/MariaDB - Alternative option
- SQLite - Development only
Database Configuration Guide β
Cache Layer
- Redis - Recommended for caching and task queues
- Memcached - Alternative caching backend
Background Tasks
- ReArq - Built-in task processing
- Celery - Alternative (requires additional setup)
Reverse Proxy
- Nginx - Recommended
- Apache - Alternative
- Traefik - For Docker deployments (included)
π Deployment Checklist
Before deploying to production:
Security
-
DEBUG = Falsein production - Strong
SECRET_KEY(50+ characters) - Configure
ALLOWED_HOSTSwith actual domains - Enable HTTPS/SSL
- Set up CORS properly via
security_domains - Use environment variables for secrets
Configuration
- Database connection configured
- Redis/cache configured
- Email service configured
- Static files configured (Whitenoise or CDN)
- Media files storage configured
- Logging configured
Monitoring
- Health check endpoints configured
- Logging to centralized service
- Error tracking (Sentry, etc.)
- Performance monitoring
- Uptime monitoring
Backup & Recovery
- Database backups automated
- Media files backups
- Backup restore tested
- Disaster recovery plan
See Also
Docker Deployment
- Docker Overview - Complete Docker guide
- Development Setup - Local environment
- Production Setup - Production deployment
- Configuration - Docker-specific config
Configuration
- Environment Setup - Environment variables
- Security Settings - Production security
- Logging Configuration - Structured logging
- Monitoring Setup - Health checks and monitoring
Guides
- Production Config - Production best practices
- Multi-Database Setup - Database routing
- Troubleshooting - Common issues
TAGS: deployment, production, docker, cloud, infrastructure DEPENDS_ON: [django-cfg, docker, postgresql, redis] USED_BY: [production, ci-cd, devops]