feat: Add complete production deployment infrastructure
- Docker configuration: - Multi-stage Dockerfiles for backend (Python 3.11) and frontend (Node 20) - Production docker-compose.yml with all services - Development docker-compose.dev.yml with hot-reload - Nginx reverse proxy: - SSL/TLS termination with modern cipher suites - Rate limiting and security headers - Caching and compression - Load balancing ready - Kubernetes manifests: - Deployment, Service, Ingress configurations - ConfigMap and Secrets - HPA for auto-scaling - PersistentVolumeClaims - Deployment scripts: - deploy.sh: Automated deployment with health checks - backup.sh: Automated backup with retention - health-check.sh: Service health monitoring - setup-ssl.sh: Let's Encrypt SSL automation - Monitoring: - Prometheus configuration - Grafana dashboards (optional) - Structured logging - Documentation: - DEPLOYMENT_GUIDE.md: Complete deployment instructions - Environment templates (.env.production) Ready for commercial deployment!
This commit is contained in:
75
.env.production
Normal file
75
.env.production
Normal file
@@ -0,0 +1,75 @@
|
||||
# ============================================
|
||||
# Document Translation API - Production Environment
|
||||
# ============================================
|
||||
# IMPORTANT: Review and update all values before deployment
|
||||
|
||||
# ===========================================
|
||||
# Application Settings
|
||||
# ===========================================
|
||||
APP_NAME=Document Translation API
|
||||
APP_ENV=production
|
||||
DEBUG=false
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# ===========================================
|
||||
# Server Configuration
|
||||
# ===========================================
|
||||
HTTP_PORT=80
|
||||
HTTPS_PORT=443
|
||||
BACKEND_PORT=8000
|
||||
FRONTEND_PORT=3000
|
||||
|
||||
# ===========================================
|
||||
# Domain Configuration
|
||||
# ===========================================
|
||||
DOMAIN=translate.yourdomain.com
|
||||
NEXT_PUBLIC_API_URL=https://translate.yourdomain.com
|
||||
|
||||
# ===========================================
|
||||
# Translation Service Configuration
|
||||
# ===========================================
|
||||
TRANSLATION_SERVICE=ollama
|
||||
OLLAMA_BASE_URL=http://ollama:11434
|
||||
OLLAMA_MODEL=llama3
|
||||
|
||||
# DeepL API (optional)
|
||||
DEEPL_API_KEY=
|
||||
|
||||
# OpenAI API (optional)
|
||||
OPENAI_API_KEY=
|
||||
OPENAI_MODEL=gpt-4o-mini
|
||||
|
||||
# ===========================================
|
||||
# File Upload Settings
|
||||
# ===========================================
|
||||
MAX_FILE_SIZE_MB=50
|
||||
ALLOWED_EXTENSIONS=.docx,.xlsx,.pptx
|
||||
|
||||
# ===========================================
|
||||
# Rate Limiting
|
||||
# ===========================================
|
||||
RATE_LIMIT_ENABLED=true
|
||||
RATE_LIMIT_REQUESTS_PER_MINUTE=60
|
||||
RATE_LIMIT_TRANSLATIONS_PER_MINUTE=10
|
||||
RATE_LIMIT_TRANSLATIONS_PER_HOUR=100
|
||||
RATE_LIMIT_TRANSLATIONS_PER_DAY=500
|
||||
|
||||
# ===========================================
|
||||
# Security (CHANGE THESE!)
|
||||
# ===========================================
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_PASSWORD=CHANGE_THIS_SECURE_PASSWORD
|
||||
|
||||
# CORS Configuration
|
||||
CORS_ORIGINS=https://translate.yourdomain.com
|
||||
|
||||
# ===========================================
|
||||
# Monitoring (Optional)
|
||||
# ===========================================
|
||||
GRAFANA_USER=admin
|
||||
GRAFANA_PASSWORD=CHANGE_THIS_TOO
|
||||
|
||||
# ===========================================
|
||||
# SSL Configuration
|
||||
# ===========================================
|
||||
LETSENCRYPT_EMAIL=admin@yourdomain.com
|
||||
Reference in New Issue
Block a user