Deployment Guide
Deploy your RAPIDS projects to production with Docker and Dokploy. Fully automated with the deployment-manager agent.
🐳 Docker-First Architecture
Web (Next.js)
• Multi-stage build: deps → builder → runner
• Base image: node:20-alpine
• Build output: standalone mode
• File: web/Dockerfile
Backend (FastAPI)
• Single-stage Python build
• Base image: python:3.12-slim
• Health checks required
• File: backend/Dockerfile
Mobile (Flutter)
• No Docker required (native mobile apps)
• Build for iOS: Xcode + App Store Connect
• Build for Android: Gradle + Google Play Console
🚀 Dokploy Integration
RAPIDS integrates with Dokploy for self-hosted Docker PaaS deployment:
Setup Environment Variables
Add to your .env
file:
DOKPLOY_URL=https://your-dokploy-instance.com DOKPLOY_API_KEY=your_api_key_here
🤖 Using Deployment Manager Agent
Deploy to Staging
/deploy "Push to staging"
What it does:
1. Runs pre-deployment checks
2. Builds Docker images
3. Tags versions
4. Deploys to Dokploy
5. Runs health checks
6. Sets up monitoring
Deploy to Production
/deploy "Push to production with security scan"
⚙️ Manual Deployment
If you prefer manual deployment, follow these steps:
1. Build Docker Images
# Build web (Next.js)
docker build -t myapp-web:latest ./web
# Build backend (FastAPI)
docker build -t myapp-backend:latest ./backend
2. Push to Registry
# Tag images
docker tag myapp-web:latest registry.example.com/myapp-web:latest
docker tag myapp-backend:latest registry.example.com/myapp-backend:latest
# Push
docker push registry.example.com/myapp-web:latest
docker push registry.example.com/myapp-backend:latest
3. Deploy to Dokploy
Use Dokploy UI or CLI to deploy the images
# Or use deployment-manager agent
/deploy "Deploy myapp-web and myapp-backend to production"
🔐 Environment Variables
Production Environment Variables
# Database DATABASE_URL=postgresql://user:pass@host:5432/db # Authentication NEXTAUTH_SECRET=your_secret_here NEXTAUTH_URL=https://yourapp.com # Deployment DOKPLOY_URL=https://dokploy.yourserver.com DOKPLOY_API_KEY=your_api_key # External Services GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx NEON_API_KEY=neon_xxx
❤️ Health Checks
Backend Health Check
FastAPI endpoint for health monitoring:
@app.get("/health")
async def health_check():
return {"status": "healthy", "timestamp": datetime.utcnow()}
Docker Health Check
Add to Dockerfile:
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD curl --fail http://localhost:8000/health || exit 1