-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.production.example
More file actions
116 lines (86 loc) · 3.99 KB
/
.env.production.example
File metadata and controls
116 lines (86 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Turkiye API Production Environment Configuration
# Copy this file to .env for production deployment
# ============================================================================
# Application Configuration
# ============================================================================
APP_NAME=Turkiye API
APP_VERSION=1.0.0
ENVIRONMENT=production
DEBUG=false
# ============================================================================
# Server Configuration
# ============================================================================
HOST=0.0.0.0
PORT=8181
# Worker processes (0 = auto-calculate based on CPU count)
WORKERS=0
# ============================================================================
# Security Configuration
# ============================================================================
# CORS Allowed Origins (comma-separated)
# IMPORTANT: Set to your actual domain(s), NOT "*"
ALLOWED_ORIGINS=https://yourdomain.com,https://api.yourdomain.com
# ============================================================================
# Logging Configuration
# ============================================================================
# Use INFO or WARNING in production
LOG_LEVEL=INFO
# Use JSON format for log aggregation systems (ELK, Datadog, etc.)
LOG_FORMAT=json
# ============================================================================
# Rate Limiting Configuration
# ============================================================================
# IMPORTANT: Enable rate limiting in production
RATE_LIMIT_ENABLED=true
# Adjust based on your traffic needs
RATE_LIMIT_PER_MINUTE=100
# IMPORTANT: Use Redis for multi-instance deployments
RATE_LIMIT_STORAGE=redis
# Redis Configuration
# Replace with your production Redis URL
REDIS_URL=redis://:your-redis-password@redis.production.example.com:6379/0
# For Redis Sentinel:
# REDIS_URL=redis+sentinel://sentinel-host:26379/mymaster/0
# For Redis Cluster:
# REDIS_URL=redis://host1:7000,host2:7001,host3:7002/0
# For AWS ElastiCache:
# REDIS_URL=redis://your-elasticache-endpoint.cache.amazonaws.com:6379
# ============================================================================
# Metrics & Monitoring Configuration
# ============================================================================
# Enable metrics for production monitoring
METRICS_ENABLED=true
# Enable Prometheus metrics endpoint
PROMETHEUS_ENABLED=true
# ============================================================================
# Cookie Configuration
# ============================================================================
# Cookie settings are automatically secure in production
# (HTTPS-only, SameSite=strict)
# No additional configuration needed
# ============================================================================
# Data Configuration
# ============================================================================
DATA_DIR=app/data
# ============================================================================
# Optional: Error Tracking
# ============================================================================
# Sentry DSN for error tracking (recommended for production)
# SENTRY_DSN=https://your-sentry-key@sentry.io/your-project-id
# ============================================================================
# Production Deployment Notes
# ============================================================================
# Before deploying to production:
# 1. Set ENVIRONMENT=production
# 2. Set DEBUG=false
# 3. Configure ALLOWED_ORIGINS with your actual domains
# 4. Enable rate limiting (RATE_LIMIT_ENABLED=true)
# 5. Use Redis for rate limiting (RATE_LIMIT_STORAGE=redis)
# 6. Enable Prometheus metrics (PROMETHEUS_ENABLED=true)
# 7. Use JSON logging (LOG_FORMAT=json)
# 8. Ensure Redis is properly configured and accessible
# 9. Set up SSL/TLS (cookies will be secure automatically)
# 10. Configure error tracking (Sentry recommended)
# For more information, see:
# - DEPLOYMENT_EN.md - Deployment guide
# - ADVANCED_FEATURES.md - Advanced features documentation