mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 07:52:55 +00:00
- Add docker-compose.yml for Dokploy deployment - Add Dockerfile optimized for production - Add nginx.conf for SSL and reverse proxy - Update Django settings for ai.quantumtaskai.com domain - Add Neon database configuration - Add deployment guides and environment generators - Remove CapRover specific files
4.4 KiB
4.4 KiB
🚀 Quantum Tasks AI - Dokploy + Neon Deployment Summary
Perfect! Your configuration is now optimized for Neon database
✅ What's Been Updated for Neon:
- docker-compose.yml - Removed PostgreSQL container, using external Neon DB
- Environment Variables - Updated to use
NEON_DATABASE_URL - Deployment Guide - Updated with Neon-specific instructions
- Generator Script - New
generate_neon_env.pyfor secure values
🎯 Your Environment Variables (Generated)
Copy these to your Dokploy environment settings:
# 🔑 ESSENTIAL VARIABLES (Required)
SECRET_KEY=b+6h(2YAa#8NPRfHApILsw&A8m^yQU=QfPMBCCsjEx31-)sDZh
DEBUG=false
ALLOWED_HOSTS=ai.quantumtaskai.com,*.quantumtaskai.com,quantumtaskai.com
CSRF_TRUSTED_ORIGINS=https://ai.quantumtaskai.com,https://quantumtaskai.com
# 🗄️ NEON DATABASE (Replace with your actual connection string)
NEON_DATABASE_URL=postgresql://your_username:your_password@your_endpoint.neon.tech/quantumtasks_ai?sslmode=require
# 📧 EMAIL CONFIGURATION (Fill in your values)
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-gmail-app-password
DEFAULT_FROM_EMAIL=Quantum Tasks AI <noreply@ai.quantumtaskai.com>
REQUIRE_EMAIL_VERIFICATION=true
# 🔒 SECURITY SETTINGS
SECURE_SSL_REDIRECT=true
SECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,https
COMPOSE_PROJECT_NAME=quantumtasks-ai
🗄️ How to Get Your Neon Database URL
- Login to Neon: Go to https://neon.tech
- Select/Create Project: Choose your project or create a new one
- Get Connection String:
- Go to Dashboard → Connection Details
- Copy the Connection String
- It should look like:
postgresql://username:password@ep-xxx.neon.tech/dbname?sslmode=require
- Create Database (if needed): Make sure you have a database named
quantumtasks_ai
📋 Dokploy Configuration Steps
Step 1: Create Project
- Type: Docker Compose
- Name: quantumtasks-ai
- Repository: Your GitHub repository URL
Step 2: Configure Environment
Copy all the variables above to Dokploy's environment settings, making sure to:
- ✅ Replace
NEON_DATABASE_URLwith your actual Neon connection string - ✅ Update email settings with your Gmail credentials
- ✅ Add API keys as needed (Stripe, OpenAI, etc.)
Step 3: Set Domain
- Domain: ai.quantumtaskai.com
- SSL: Enable Let's Encrypt
- Port: 80
Step 4: Deploy
Click Deploy and monitor the build process
🏗️ Simplified Architecture (with Neon)
Internet → Nginx (SSL/Proxy) → Django App → Neon PostgreSQL (Serverless)
↓
Static Files (Volume)
Benefits of using Neon:
- ✅ No database container to manage
- ✅ Automatic backups and scaling
- ✅ Serverless PostgreSQL (pay for what you use)
- ✅ Built-in connection pooling
- ✅ Geographic distribution
- ✅ Branch databases for development
🔧 Post-Deployment Commands
After successful deployment, run these in Dokploy terminal:
# Initialize database tables
python manage.py migrate
# Create admin user
python manage.py createsuperuser
# Collect static files (if needed)
python manage.py collectstatic --noinput
🔍 Testing Your Deployment
- Health Check: https://ai.quantumtaskai.com/health/
- Website: https://ai.quantumtaskai.com/
- Admin: https://ai.quantumtaskai.com/admin/
💡 Advantages of This Setup
- 🌍 Global Scale: Neon provides global database distribution
- 💰 Cost Effective: Pay only for database usage, not idle time
- 🔄 Auto Scaling: Database scales automatically with traffic
- 🛡️ Secure: SSL-only connections, managed security
- 📈 Performance: Built-in connection pooling and caching
- 🔧 Simple: No database container management needed
📁 Files Created/Updated
- ✅
docker-compose.yml- Simplified without DB container - ✅
Dockerfile- Production-ready Django container - ✅
nginx.conf- SSL + reverse proxy configuration - ✅
.env.neon- Environment variables template - ✅
generate_neon_env.py- Secure variable generator - ✅
DOKPLOY_SETUP_GUIDE.md- Step-by-step deployment guide - ✅ Django settings updated for ai.quantumtaskai.com
🎉 You're ready to deploy to ai.quantumtaskai.com with Neon!
The setup is now optimized for serverless database hosting with simplified container management.