Deployment¶
Guides for deploying Duckling in various environments.
Overview¶
Duckling can be deployed in multiple ways depending on your needs:
-
Production
Deploy with Gunicorn, Nginx, and systemd
-
Scaling
Scale for high traffic with load balancing
-
Security
Security best practices and hardening
Deployment Options¶
| Method | Best For | Complexity |
|---|---|---|
| Docker Compose | Quick deployment, testing | Low |
| Manual + Nginx | Full control, customization | Medium |
| Kubernetes | Large scale, cloud-native | High |
Quick Reference¶
Docker (Simplest)¶
Manual Deployment¶
# Backend with Gunicorn
cd backend
gunicorn -w 4 -b 0.0.0.0:5001 app:app
# Frontend build
cd frontend
npm run build
# Serve dist/ with nginx
Environment Checklist¶
Before deploying to production:
- Set strong
SECRET_KEY - Set
FLASK_DEBUG=false - Configure CORS for your domain
- Enable HTTPS
- Set appropriate file size limits
- Configure reverse proxy
- Set up monitoring and logging