-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
137 lines (119 loc) · 5.13 KB
/
Copy path.env.example
File metadata and controls
137 lines (119 loc) · 5.13 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# =============================================================================
# LLM-PROXY ENVIRONMENT CONFIGURATION
# =============================================================================
# Copy to .env.local (development) or .env (production)
# NEVER commit files with real secrets to version control!
#
# For development: cp .env.example .env.local
# For production: cp .env.example .env (on the server only)
# =============================================================================
# -----------------------------------------------------------------------------
# ENVIRONMENT (development | production)
# -----------------------------------------------------------------------------
ENVIRONMENT=development
# -----------------------------------------------------------------------------
# SERVER
# -----------------------------------------------------------------------------
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
SERVER_TIMEOUT=300s
SERVER_READ_TIMEOUT=30s
SERVER_WRITE_TIMEOUT=30s
# CORS allowed origins (comma-separated)
# Development: http://localhost:5173,http://localhost:3005,http://localhost:3000
# Production: https://scrubgate.tech,https://scrubgate.com
SERVER_CORS_ORIGINS=http://localhost:5173,http://localhost:3005,http://localhost:3000
# -----------------------------------------------------------------------------
# DATABASE (PostgreSQL)
# -----------------------------------------------------------------------------
# Development: localhost:5433 | Docker: postgres:5432
DB_HOST=localhost
DB_PORT=5433
DB_NAME=llm_proxy
DB_USER=proxy_user
DB_PASSWORD=CHANGE_ME_min_16_chars
DB_MAX_CONNECTIONS=25
DB_SSL_MODE=disable
# -----------------------------------------------------------------------------
# REDIS
# -----------------------------------------------------------------------------
# Development: localhost:6380 | Docker: redis:6379
REDIS_HOST=localhost
REDIS_PORT=6380
REDIS_DB=0
REDIS_PASSWORD=
REDIS_MAX_RETRIES=3
REDIS_POOL_SIZE=10
# -----------------------------------------------------------------------------
# OAUTH & JWT
# -----------------------------------------------------------------------------
# CRITICAL: Min 32 characters! Generate with: openssl rand -base64 32
OAUTH_JWT_SECRET=CHANGE_ME_min_32_chars_use_openssl_rand
OAUTH_ACCESS_TOKEN_TTL=1h
OAUTH_REFRESH_TOKEN_TTL=720h
OAUTH_ISSUER=llm-proxy
# -----------------------------------------------------------------------------
# ADMIN API
# -----------------------------------------------------------------------------
# Min 32 characters. Generate with: openssl rand -hex 32
ADMIN_API_KEY=CHANGE_ME_min_32_chars_use_openssl_rand_hex
# Multiple admin keys (comma-separated):
# ADMIN_API_KEYS=key1,key2
# -----------------------------------------------------------------------------
# LLM PROVIDERS
# -----------------------------------------------------------------------------
# Claude (https://console.anthropic.com/)
CLAUDE_API_KEY=sk-ant-api03-your-key-here
# OpenAI (optional)
# OPENAI_API_KEY=sk-your-key-here
# Multiple keys for load balancing (comma-separated):
# CLAUDE_API_KEYS=key1,key2,key3
# -----------------------------------------------------------------------------
# CACHING
# -----------------------------------------------------------------------------
CACHE_ENABLED=true
CACHE_TTL=3600
CACHE_PREFIX=llm-proxy:
# -----------------------------------------------------------------------------
# RATE LIMITING
# -----------------------------------------------------------------------------
RATE_LIMITING_ENABLED=true
RATE_LIMIT_DEFAULT_RPM=1000
RATE_LIMIT_DEFAULT_RPD=50000
# -----------------------------------------------------------------------------
# LOGGING
# -----------------------------------------------------------------------------
# Development: debug + console | Production: info + json
LOG_LEVEL=info
LOG_FORMAT=json
LOG_OUTPUT=stdout
# -----------------------------------------------------------------------------
# METRICS (Prometheus)
# -----------------------------------------------------------------------------
METRICS_ENABLED=true
METRICS_PORT=9090
METRICS_PATH=/metrics
# -----------------------------------------------------------------------------
# GRAFANA (Production only)
# -----------------------------------------------------------------------------
# GRAFANA_ADMIN_USER=admin
# GRAFANA_ADMIN_PASSWORD=CHANGE_ME
# -----------------------------------------------------------------------------
# ADMIN UI
# -----------------------------------------------------------------------------
ADMIN_UI_PORT=3005
# VITE_API_BASE_URL=http://localhost:8080
# =============================================================================
# SETUP NOTES
# =============================================================================
# 1. Generate secrets:
# OAUTH_JWT_SECRET: openssl rand -base64 32
# ADMIN_API_KEY: openssl rand -hex 32
# DB_PASSWORD: openssl rand -base64 24
#
# 2. For Docker dev: DB_HOST=postgres, DB_PORT=5432,
# REDIS_HOST=redis, REDIS_PORT=6379
# (docker-compose.dev.yml sets these via environment overrides)
#
# 3. Production: Set CORS origins to your actual domains
# =============================================================================