-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
78 lines (66 loc) · 2.76 KB
/
Copy pathenv.example
File metadata and controls
78 lines (66 loc) · 2.76 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
# JWT Configuration
JWT_SECRET_KEY=CHANGE_THIS_TO_A_STRONG_SECRET_KEY_AT_LEAST_32_CHARACTERS
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Application Configuration
DEBUG=False
LOG_LEVEL=INFO
# Security Configuration
CORS_ORIGINS=["http://localhost:3000", "http://localhost:3001", "http://127.0.0.1:3000", "http://127.0.0.1:3001"]
ALLOWED_HOSTS=["localhost", "127.0.0.1"]
# Frontend Configuration
NODE_ENV=production
VITE_API_BASE_URL=http://localhost:8080/api
# Admin Configuration
ADMIN_EMAIL=CHANGE_THIS_TO_SECURE_ADMIN_EMAIL
ADMIN_PASSWORD=CHANGE_THIS_TO_STRONG_ADMIN_PASSWORD
# Logging Configuration
LOG_FILE=logs/app.log
LOG_FORMAT=json
# Database Configuration
# Set to 'true' to reset database on startup (useful for development)
# Set to 'false' for production
RESET_DATABASE_ON_STARTUP=false
# Force complete database recreation (drops and recreates the entire database)
# Use this when you have schema incompatibility issues
FORCE_DATABASE_RECREATION=false
# Database Credentials (CHANGE THESE IN PRODUCTION)
DB_HOST=localhost
DB_PORT=3306
DB_NAME=securewallet
DB_USER=securewallet
DB_PASSWORD=CHANGE_THIS_TO_STRONG_DB_PASSWORD
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=CHANGE_THIS_TO_STRONG_REDIS_PASSWORD
REDIS_DB=0
# Cron Configuration
# Set to 'true' to automatically setup cron jobs when Docker starts
# Set to 'false' to disable automatic cron setup
AUTO_SETUP_CRON=true
# Shard Configuration (Multi-DB Partitioning)
# Unset or set DB_SHARD_COUNT=0 for single-DB mode (default).
# Set DB_SHARD_COUNT=N (N>1) to enable multi-DB sharding via user_id consistent hash.
# Each shard's DSN can be specified as a full DSN string or as individual env vars.
#
# Option A: Full DSN per shard
# DB_SHARD_COUNT=3
# DB_SHARD_0_DSN=user:pass@tcp(host1:3306)/securewallet_shard_0?charset=utf8mb4&parseTime=True&loc=Local
# DB_SHARD_1_DSN=user:pass@tcp(host2:3306)/securewallet_shard_1?charset=utf8mb4&parseTime=True&loc=Local
# DB_SHARD_2_DSN=user:pass@tcp(host3:3306)/securewallet_shard_2?charset=utf8mb4&parseTime=True&loc=Local
#
# Option B: Individual connection params per shard (falls back to DB_* defaults)
# DB_SHARD_COUNT=2
# DB_SHARD_0_HOST=shard0-db.internal
# DB_SHARD_0_PORT=3306
# DB_SHARD_0_NAME=securewallet_shard_0
# DB_SHARD_1_HOST=shard1-db.internal
# DB_SHARD_1_PORT=3306
# DB_SHARD_1_NAME=securewallet_shard_1
#
+# Shard Alert Configuration
+# SHARD_ALERT_WINDOW_SECONDS=60 — evaluation interval for alert checks (default 60s)
+# SHARD_ALERT_UNEVEN_THRESHOLD=3.0 — max/mean QPS ratio triggering uneven usage alert (default 3.0)
+# SHARD_ALERT_LATENCY_THRESHOLD_MS=100.0 — p95 latency in ms triggering latency spike alert (default 100ms)
+# SHARD_ALERT_COOLDOWN_SECONDS=300 — minimum seconds between repeated alerts per shard (default 300s)