-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
73 lines (63 loc) · 3.32 KB
/
.env.example
File metadata and controls
73 lines (63 loc) · 3.32 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
# Causality Environment Configuration
# Copy this file to .env and adjust values as needed
# =============================================================================
# Logging Configuration
# =============================================================================
LOG_LEVEL=info # debug, info, warn, error
LOG_FORMAT=json # json, text
# =============================================================================
# HTTP Gateway Configuration
# =============================================================================
HTTP_ADDR=:8080 # Listen address for HTTP server
HTTP_READ_TIMEOUT=10s # Max duration for reading request
HTTP_WRITE_TIMEOUT=30s # Max duration for writing response
HTTP_IDLE_TIMEOUT=60s # Max time to wait for next request
HTTP_MAX_HEADER_BYTES=1048576 # Max header size (1MB)
HTTP_SHUTDOWN_TIMEOUT=30s # Graceful shutdown timeout
# CORS Configuration
CORS_ALLOWED_ORIGINS=* # Comma-separated allowed origins
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
CORS_ALLOWED_HEADERS=Accept,Authorization,Content-Type,X-Request-ID,X-Correlation-ID
CORS_EXPOSED_HEADERS=X-Request-ID
CORS_ALLOW_CREDENTIALS=false
CORS_MAX_AGE=86400 # Preflight cache max age (seconds)
# Rate Limiting
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS_PER_SECOND=1000
RATE_LIMIT_BURST_SIZE=2000
# =============================================================================
# NATS Configuration
# =============================================================================
NATS_URL=nats://localhost:4222 # NATS server URL
NATS_CLIENT_NAME=causality-server # Client name for monitoring
NATS_MAX_RECONNECTS=60 # Max reconnection attempts
NATS_RECONNECT_WAIT=2s # Time between reconnection attempts
NATS_TIMEOUT=5s # Connection timeout
# Stream Configuration
NATS_STREAM_NAME=CAUSALITY_EVENTS
NATS_STREAM_SUBJECTS=events.>,requests.>,responses.>,anomalies.>
NATS_STREAM_MAX_AGE=168h # 7 days
NATS_STREAM_MAX_BYTES=107374182400 # 100GB
NATS_STREAM_REPLICAS=1
NATS_STREAM_STORAGE=file # file or memory
# =============================================================================
# Warehouse Sink Configuration (S3/MinIO)
# =============================================================================
S3_ENDPOINT=http://localhost:9000 # S3/MinIO endpoint
S3_REGION=us-east-1 # AWS region
S3_BUCKET=causality-events # Bucket name
S3_ACCESS_KEY_ID=minioadmin # Access key
S3_SECRET_ACCESS_KEY=minioadmin # Secret key
S3_USE_PATH_STYLE=true # Use path-style (required for MinIO)
S3_PREFIX=events # Key prefix for all objects
# Batching Configuration
BATCH_MAX_EVENTS=10000 # Max events per batch
BATCH_FLUSH_INTERVAL=5m # Max time before flush
BATCH_MAX_CONCURRENT_WRITES=4 # Max concurrent S3 uploads
# Parquet Configuration
PARQUET_COMPRESSION=snappy # snappy, gzip, zstd, none
PARQUET_ROW_GROUP_SIZE=10000 # Rows per row group
# =============================================================================
# Consumer Configuration (warehouse-sink only)
# =============================================================================
CONSUMER_NAME=warehouse-sink # NATS consumer durable name