Files
office_translator/.env.production
Sepehr Ramezani 26bd096a06 feat: production deployment - full update with providers, admin, glossaries, pricing, tests
Major changes across backend, frontend, infrastructure:
- Provider system with model selection (Google, DeepL, OpenAI, Ollama, Google Cloud)
- Admin panel: user management, pricing, settings
- Glossary system with CSV import/export
- Subscription and tier quota management
- Security hardening (rate limiting, API key auth, path traversal fixes)
- Docker compose for dev, prod, and IONOS deployment
- Alembic migrations for new tables
- Frontend: dashboard, pricing page, landing page, i18n (en/fr)
- Test suite and verification scripts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-25 15:01:47 +02:00

87 lines
2.6 KiB
Plaintext

# ============================================
# 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
# Use bcrypt hash — NEVER store plaintext password in production
# Generate with: python -c "from passlib.context import CryptContext; print(CryptContext(schemes=['bcrypt']).hash('YOUR_PASSWORD'))"
ADMIN_PASSWORD_HASH=
# JWT secret key — REQUIRED, generates random key at startup if not set (breaks auth on restart)
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(64))"
JWT_SECRET_KEY=
# Admin token secret — REQUIRED, generates random key at startup if not set (breaks admin sessions on restart)
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
ADMIN_TOKEN_SECRET=
# 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