# ๐Ÿš€ Quick Deploy Guide - Zero Changes Needed! This Django template is designed to deploy **without any code changes** - just set environment variables! ## โœ… **Clone and Deploy in 3 Steps** ### **Step 1: Clone Repository** ```bash git clone https://github.com/your-username/django-template.git cd django-template ``` ### **Step 2: Set Environment Variables in Dokploy** Set these **4 required variables** in Dokploy environment tab: ```env DOMAIN_NAME=yourdomain.com ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com CSRF_TRUSTED_ORIGINS=https://yourdomain.com SECRET_KEY=your-secret-key-here ``` **Optional variables:** ```env DEBUG=False SECURE_SSL_REDIRECT=True GOOGLE_OAUTH2_CLIENT_ID=your-google-client-id GOOGLE_OAUTH2_CLIENT_SECRET=your-google-client-secret ``` ### **Step 3: Deploy** 1. **Dokploy Compose Path**: `./docker-compose.dokploy.yml` 2. **Domain**: Set in Dokploy UI (service=web, port=8000) 3. **Deploy** ๐Ÿš€ ## ๐ŸŽฏ **That's It! No Code Changes Required!** ### **Default Values** (works out-of-the-box for testing): - **DOMAIN_NAME**: `localhost` - **ALLOWED_HOSTS**: `localhost,127.0.0.1` - **CSRF_TRUSTED_ORIGINS**: `http://localhost:8000` - **SECRET_KEY**: Development key (change for production!) - **DEBUG**: `True` (change to `False` for production) ### **What Happens Automatically:** โœ… Database migrations run โœ… User groups created (admin, staff, user) โœ… Site configured with your domain โœ… Social apps set up โœ… Static files collected โœ… Gunicorn starts serving your app ## ๐Ÿ”ง **For Different Deployment Platforms** ### **Included Database (Default)** - **Compose file**: `docker-compose.dokploy.yml` - **Database**: Included PostgreSQL container - **Storage**: Docker volumes for persistence ### **External Database** - **Compose file**: `docker-compose.dokploy.yml` + set `DATABASE_URL` - **Examples**: Neon, Supabase, Railway, etc. ## ๐Ÿงช **Test Locally First** (Optional) ```bash # 1. Set environment variables export DOMAIN_NAME=localhost export ALLOWED_HOSTS=localhost,127.0.0.1 export SECRET_KEY=test-secret-key # 2. Test with Docker docker-compose -f docker-compose.dokploy.yml up # 3. Visit http://localhost:8000 ``` ## ๐ŸŽ‰ **Environment Variable Examples** ### **For `myapp.com`:** ```env DOMAIN_NAME=myapp.com ALLOWED_HOSTS=myapp.com,www.myapp.com CSRF_TRUSTED_ORIGINS=https://myapp.com,https://www.myapp.com SECRET_KEY=super-long-secret-key-generate-new-one DEBUG=False SECURE_SSL_REDIRECT=True ``` ### **For `app.example.org`:** ```env DOMAIN_NAME=app.example.org ALLOWED_HOSTS=app.example.org CSRF_TRUSTED_ORIGINS=https://app.example.org SECRET_KEY=another-unique-secret-key DEBUG=False SECURE_SSL_REDIRECT=True ``` ## โšก **Why This Works** - โœ… **No hardcoded domains** - everything uses environment variables - โœ… **Sensible defaults** - works locally without any setup - โœ… **Production ready** - just change a few env vars - โœ… **Platform agnostic** - works on Dokploy, Railway, Heroku, etc. --- **Clone โžœ Set 4 env vars โžœ Deploy โžœ Done!** ๐Ÿš€