-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
296 lines (243 loc) · 8.15 KB
/
.env.example
File metadata and controls
296 lines (243 loc) · 8.15 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# =====================================================
# Environment Configuration Examples
# Copy this file to .env and update values as needed
# =====================================================
# =====================================================
# Node Environment
# =====================================================
NODE_ENV=development
LOG_LEVEL=info
# =====================================================
# PostgreSQL Configuration
# =====================================================
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=agent_orchestrator
POSTGRES_USER=admin
POSTGRES_PASSWORD=postgres123
# PostgreSQL Connection Pool Settings
POSTGRES_POOL_MIN=5
POSTGRES_POOL_MAX=20
# PostgreSQL SSL Configuration (Production)
POSTGRES_SSL_ENABLED=false
POSTGRES_SSL_REJECT_UNAUTHORIZED=true
# =====================================================
# Redis Configuration
# =====================================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=redis123
REDIS_DB=0
REDIS_PREFIX=agent:
# Redis Cluster Configuration (optional)
REDIS_CLUSTER=false
REDIS_CLUSTER_NODES=[]
# Redis Sentinel Configuration (optional)
REDIS_SENTINEL=false
REDIS_SENTINELS=[]
REDIS_SENTINEL_NAME=mymaster
# =====================================================
# RabbitMQ Configuration
# =====================================================
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
RABBITMQ_USER=admin
RABBITMQ_PASSWORD=rabbitmq123
RABBITMQ_VHOST=/
# RabbitMQ Management UI
RABBITMQ_MANAGEMENT_PORT=15672
# =====================================================
# Database Backup Configuration
# =====================================================
BACKUP_DIR=./backups
POSTGRES_BACKUP_PATH=./backups/postgres
REDIS_BACKUP_PATH=./backups/redis
# Daily backup at 02:00 AM (cron format)
BACKUP_SCHEDULE=0 2 * * *
# Keep last N backups
BACKUP_RETENTION_DAYS=7
# =====================================================
# Monitoring Configuration
# =====================================================
PROMETHEUS_PORT=9090
GRAFANA_USER=admin
GRAFANA_PASSWORD=grafana123
GRAFANA_PORT=3000
# pgAdmin Configuration
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=pgadmin123
# Redis Commander Configuration
REDIS_COMMANDER_USER=admin
REDIS_COMMANDER_PASSWORD=commander123
# =====================================================
# Security Configuration
# =====================================================
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_EXPIRY=24h
# Session configuration
SESSION_SECRET=your-session-secret-key
SESSION_TIMEOUT=3600000 # 1 hour in milliseconds
# Encryption for sensitive data
ENCRYPTION_KEY=your-32-character-encryption-key
# =====================================================
# Rate Limiting Configuration
# =====================================================
RATE_LIMIT_ENABLED=true
RATE_LIMIT_WINDOW=15 # minutes
RATE_LIMIT_MAX_REQUESTS=100
# Per-endpoint rate limits
RATE_LIMIT_API_MAX=100
RATE_LIMIT_AUTH_MAX=5
# =====================================================
# Application Configuration
# =====================================================
APP_NAME=Multi-Agent Orchestrator
APP_VERSION=1.0.0
APP_PORT=3000
# API Configuration
API_PREFIX=/api/v1
API_TIMEOUT=30000 # milliseconds
# =====================================================
# Cache Configuration
# =====================================================
CACHE_ENABLED=true
CACHE_DEFAULT_TTL=600 # seconds
# L1 Cache (In-Memory LRU)
L1_CACHE_MAX_SIZE=500
L1_CACHE_TTL=60000 # milliseconds
# L2 Cache (Redis)
L2_CACHE_TTL=3600 # seconds
# =====================================================
# Agent Configuration
# =====================================================
AGENT_HEARTBEAT_INTERVAL=5000 # milliseconds
AGENT_IDLE_TIMEOUT=300000 # 5 minutes
AGENT_RECONNECT_ATTEMPTS=5
AGENT_RECONNECT_DELAY=5000 # milliseconds
# =====================================================
# Task Configuration
# =====================================================
TASK_QUEUE_MAX_SIZE=10000
TASK_TIMEOUT=300000 # 5 minutes
TASK_MAX_RETRIES=3
TASK_RETRY_DELAY=5000 # milliseconds
# Task priority queue settings
TASK_PRIORITY_LEVELS=5
TASK_HIGH_PRIORITY_WEIGHT=2
# =====================================================
# Logging Configuration
# =====================================================
LOG_FORMAT=json
LOG_DIR=./logs
LOG_MAX_SIZE=10m
LOG_MAX_FILES=14
# Debug logging for specific modules
DEBUG_DB=false
DEBUG_REDIS=false
DEBUG_RABBITMQ=false
DEBUG_CACHE=false
# =====================================================
# Metrics Configuration
# =====================================================
METRICS_ENABLED=true
METRICS_COLLECTION_INTERVAL=60000 # milliseconds
METRICS_RETENTION_PERIOD=604800000 # 7 days in milliseconds
# Metrics to collect
METRICS_DB=true
METRICS_CACHE=true
METRICS_QUEUE=true
METRICS_AGENTS=true
# =====================================================
# Email Configuration (Optional)
# =====================================================
EMAIL_ENABLED=false
EMAIL_PROVIDER=smtp
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@example.com
EMAIL_PASSWORD=your-app-password
EMAIL_FROM=no-reply@example.com
# =====================================================
# Slack Configuration (Optional)
# =====================================================
SLACK_ENABLED=false
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
SLACK_CHANNEL=#notifications
SLACK_USERNAME=Agent Orchestrator Bot
# =====================================================
# Feature Flags
# =====================================================
FEATURE_AUDIT_LOGGING=true
FEATURE_DISTRIBUTED_LOCKING=true
FEATURE_QUERY_CACHING=true
FEATURE_SESSION_PERSISTENCE=true
FEATURE_RATE_LIMITING=true
# =====================================================
# Development Configuration
# =====================================================
DEVELOPMENT_MODE=true
MOCK_EXTERNAL_SERVICES=false
# Test configuration
TEST_DATABASE=agent_orchestrator_test
TEST_TIMEOUT=30000
ENABLE_TEST_FIXTURES=true
# =====================================================
# Production Configuration
# =====================================================
# IMPORTANT: Override these in production!
PRODUCTION_MODE=false
ALLOW_INSECURE_CONNECTIONS=false
CORS_ORIGIN=http://localhost:3000
# Database optimization
QUERY_CACHE_ENABLED=true
QUERY_CACHE_INVALIDATION=automatic
# =====================================================
# Advanced Performance Tuning
# =====================================================
# PostgreSQL statement timeout (milliseconds)
POSTGRES_STATEMENT_TIMEOUT=30000
# Redis command timeout (milliseconds)
REDIS_COMMAND_TIMEOUT=5000
# Connection idle timeout (milliseconds)
CONNECTION_IDLE_TIMEOUT=30000
# Health check interval (milliseconds)
HEALTH_CHECK_INTERVAL=30000
# =====================================================
# Observability
# =====================================================
TRACE_ENABLED=false
TRACE_SAMPLE_RATE=0.1
# Error reporting
SENTRY_ENABLED=false
SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id
# Custom telemetry endpoint
TELEMETRY_ENABLED=false
TELEMETRY_ENDPOINT=http://localhost:9090
# =====================================================
# Integration Configuration
# =====================================================
# Claude AI Integration
CLAUDE_API_KEY=sk-ant-xxxxx
CLAUDE_MODEL=claude-3-5-sonnet-20241022
# External API Timeouts
EXTERNAL_API_TIMEOUT=30000
# Webhook Configuration
WEBHOOK_ENABLED=true
WEBHOOK_SECRET=your-webhook-secret
WEBHOOK_RETRIES=3
WEBHOOK_RETRY_DELAY=5000
# =====================================================
# Notes
# =====================================================
# 1. Change all default passwords in production
# 2. Use strong JWT_SECRET and ENCRYPTION_KEY
# 3. Enable SSL/TLS in production
# 4. Set NODE_ENV=production in production
# 5. Configure backup retention policy
# 6. Enable monitoring and alerting
# 7. Review rate limiting settings
# 8. Configure email/Slack for notifications
# 9. Set up proper error tracking (Sentry)
# 10. Enable CORS with specific origins in production
# RabbitMQ Configuration (for MCP server)
RABBITMQ_URL=amqp://admin:rabbitmq123@localhost:5672