-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy path.env.example
More file actions
149 lines (127 loc) · 4.66 KB
/
Copy path.env.example
File metadata and controls
149 lines (127 loc) · 4.66 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
# Application
NODE_ENV=development
PORT=3000
HOST=0.0.0.0
LOG_LEVEL=debug
# Trading Configuration
SLIPPAGE_TOLERANCE_BPS=50
# Database (PostgreSQL)
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=stellarswipe
DATABASE_PASSWORD=your_password_here
DATABASE_NAME=stellarswipe_db
DATABASE_SYNCHRONIZE=false
DATABASE_LOGGING=true
DATABASE_SSL=false
# Database Connection Pool
DATABASE_POOL_MIN=10
DATABASE_POOL_MAX=30
DATABASE_POOL_IDLE_TIMEOUT=30000
DATABASE_POOL_CONNECTION_TIMEOUT=2000
# Cache (Redis)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# Stellar Blockchain
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org:443
STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
STELLAR_API_TIMEOUT=30000
STELLAR_MAX_RETRIES=3
STELLAR_MAX_CALL_DEPTH=5
STELLAR_MAX_CALL_DEPTH_POLICY=reject # 'reject' or 'warn'
# Horizon bulkhead isolation — bounded concurrency pools per call category so a
# degraded category (e.g. reads) can't starve another (e.g. writes/submissions).
STELLAR_HORIZON_READ_MAX_CONCURRENT=20
STELLAR_HORIZON_READ_MAX_QUEUE=100
STELLAR_HORIZON_WRITE_MAX_CONCURRENT=5
STELLAR_HORIZON_WRITE_MAX_QUEUE=25
# Stellar Platform Accounts (server-side signing)
# STELLAR_SECRET_KEY – main platform account secret (used by PayoutService)
# STELLAR_SPONSOR_SECRET_KEY – fee-bump sponsor + sponsored-reserves account secret
STELLAR_SECRET_KEY=<your_platform_stellar_secret_key>
STELLAR_SPONSOR_SECRET_KEY=<your_sponsor_stellar_secret_key>
STELLAR_USDC_ISSUER=GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
# JWT
JWT_SECRET=your_jwt_secret_here
JWT_EXPIRATION=7d
# CORS
CORS_ORIGIN=http://localhost:3001,http://localhost:3000
CORS_ALLOWED_ORIGINS=http://localhost:3000
CORS_CREDENTIALS=true
# Data Export & Compliance
EXPORT_DIR=/tmp/exports
ENCRYPTION_KEY=your-secure-encryption-key-minimum-32-chars
AUTO_DELETE_EXPORTS_DAYS=7
MONTHLY_REPORT_ENABLED=true
# Position Archive Retention (days) - closed positions moved to cold storage after this period
POSITION_ARCHIVE_RETENTION_DAYS=90
# Cron schedules for scheduled jobs
CRON_BACKUP_DAILY=0 2 * * *
CRON_BACKUP_WEEKLY=0 2 * * 0
CRON_BACKUP_MONTHLY=0 2 1 * *
CRON_BACKUP_CLEANUP=0 3 * * *
CRON_POSITION_ARCHIVE=0 3 * * *
# Expired refresh token cleanup job
REFRESH_TOKEN_CLEANUP_CRON=0 3 * * *
REFRESH_TOKEN_CLEANUP_BATCH_SIZE=500
# Email
EMAIL_PROVIDER=sendgrid
SENDGRID_API_KEY=your_sendgrid_api_key
AWS_SES_REGION=us-east-1
AWS_SES_ACCESS_KEY=your_aws_access_key
AWS_SES_SECRET_KEY=your_aws_secret_key
# SMS
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1234567890
# Tracing (#367)
TRACING_ENABLED=false # set to 'true' to enable distributed tracing
TRACING_SERVICE_NAME=stellarswipe-backend # service label in outbound trace headers
TRACING_SAMPLE_RATE=1.0 # 0.0–1.0 fraction of requests to sample (1.0 = 100%)
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces # OTLP/HTTP collector endpoint
# JAEGER_OTLP_ENDPOINT=http://localhost:4318/v1/traces # legacy alias, same as above
# Sentry (Error Tracking)
SENTRY_DSN=your_sentry_dsn_here
SENTRY_ENVIRONMENT=development
# Rate Limiting
RATE_LIMIT_TTL=60
RATE_LIMIT_MAX=100
# Per-tier rate limiting overrides (issue #639) — all optional, fall back to the
# defaults below when unset. WINDOW is in seconds. See docs/RATE_LIMITING.md.
# RATE_LIMIT_PUBLIC_LIMIT=100
# RATE_LIMIT_PUBLIC_WINDOW=900
# RATE_LIMIT_AUTHENTICATED_LIMIT=1000
# RATE_LIMIT_AUTHENTICATED_WINDOW=900
# RATE_LIMIT_TRADE_LIMIT=10
# RATE_LIMIT_TRADE_WINDOW=60
# RATE_LIMIT_SIGNAL_LIMIT=10
# RATE_LIMIT_SIGNAL_WINDOW=86400
# RATE_LIMIT_ADMIN_LIMIT=10000
# RATE_LIMIT_ADMIN_WINDOW=900
# Elasticsearch
ELASTICSEARCH_NODE=http://localhost:9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=changeme
# N+1 Detection (Development Mode Only)
# Maximum queries per request before logging a warning
NPLUS1_MAX_QUERIES=25
# Maximum cumulative query time per request (ms) before logging a warning
NPLUS1_MAX_QUERY_TIME_MS=1000
# Enable N+1 warning logging in production (use with structured logging)
NPLUS1_LOG_IN_PRODUCTION=false
# Secrets Management (Issue #893)
# Secret provider: env | vault | aws-secrets-manager | kubernetes
# Default: 'env' (reads from environment variables — local dev fallback)
SECRET_PROVIDER=env
# HashiCorp Vault (when SECRET_PROVIDER=vault)
VAULT_URL=
VAULT_TOKEN=
# AWS Secrets Manager (when SECRET_PROVIDER=aws-secrets-manager)
# AWS_SECRETS_REGION is already defined above
# Kubernetes (when SECRET_PROVIDER=kubernetes)
K8S_SECRET_NAME=stellarswipe-secrets
K8S_NAMESPACE=default