forked from Axionvera/axionvera-network
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.grpc.example
More file actions
75 lines (62 loc) · 3.23 KB
/
Copy path.env.grpc.example
File metadata and controls
75 lines (62 loc) · 3.23 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
# gRPC/JSON-RPC Bridge Configuration Example
# Copy this file to .env and modify as needed
# Server Configuration
BIND_ADDRESS=0.0.0.0:8080 # HTTP API Gateway (existing)
GRPC_BIND_ADDRESS=0.0.0.0:50051 # gRPC Server
GATEWAY_BIND_ADDRESS=0.0.0.0:8081 # HTTP Gateway for gRPC services
# Database Configuration
DATABASE_URL=postgresql://user:pass@localhost:5432/axionvera
DB_POOL_SIZE=10
# Stellar / Soroban Configuration
SOROBAN_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# gRPC Configuration
GRPC_MAX_MESSAGE_SIZE=4194304 # 4MB max message size
GRPC_MAX_CONNECTIONS=1000 # Max concurrent connections
GRPC_CONNECTION_TIMEOUT=30 # Connection timeout (seconds)
GRPC_KEEPALIVE_TIME=60 # Keepalive interval (seconds)
GRPC_KEEPALIVE_TIMEOUT=5 # Keepalive timeout (seconds)
# TLS Configuration (Optional)
# TLS_CERT_PATH=/path/to/server.crt
# TLS_KEY_PATH=/path/to/server.key
# TLS_CA_CERT_PATH=/path/to/ca.crt
# Feature Flags
ENABLE_GATEWAY=true # Enable HTTP gateway
ENABLE_REFLECTION=true # Enable gRPC reflection (dev only)
ENABLE_COMPRESSION=true # Enable gzip compression
ENABLE_METRICS=true # Enable Prometheus metrics
ENABLE_TRACING=true # Enable distributed tracing
# Logging Configuration
LOG_LEVEL=info
LOG_FORMAT=json # json or text
GRPC_LOG_LEVEL=info # gRPC specific logging
# Performance Configuration
SHUTDOWN_GRACE_PERIOD=10 # Graceful shutdown period (seconds)
MAX_CONCURRENT_REQUESTS=1000 # Max concurrent requests
REQUEST_TIMEOUT=30 # Request timeout (seconds)
# Security Configuration
RATE_LIMIT_REQUESTS_PER_SECOND=100 # Rate limit per client
RATE_LIMIT_BURST=200 # Rate limit burst size
ENABLE_SIGNATURE_VALIDATION=true # Enable signature validation
NONCE_VALIDATION_WINDOW=300 # Nonce validation window (seconds)
# P2P Network Configuration
MAX_PEERS=50 # Maximum peer connections
PEER_DISCOVERY_INTERVAL=30 # Peer discovery interval (seconds)
PEER_TIMEOUT=300 # Peer connection timeout (seconds)
# Monitoring and Observability
METRICS_PORT=9090 # Prometheus metrics port
HEALTH_CHECK_INTERVAL=10 # Health check interval (seconds)
JAEGER_ENDPOINT=http://localhost:14268/api/traces # Jaeger tracing endpoint
# Development Configuration
DEV_MODE=true # Enable development features
MOCK_CONTRACT_CALLS=true # Mock contract calls (dev only)
ENABLE_CORS=true # Enable CORS for HTTP gateway
CORS_ORIGINS=http://localhost:3000,http://localhost:8080
# Production Configuration (uncomment for production)
# DEV_MODE=false
# ENABLE_REFLECTION=false
# LOG_LEVEL=warn
# GRPC_LOG_LEVEL=error
# ENABLE_SIGNATURE_VALIDATION=true
# TLS_CERT_PATH=/etc/ssl/certs/axionvera.crt
# TLS_KEY_PATH=/etc/ssl/private/axionvera.key