forked from SourceXXL/alian_structure-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.production.example
More file actions
81 lines (66 loc) · 2.46 KB
/
Copy path.env.production.example
File metadata and controls
81 lines (66 loc) · 2.46 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
# Production Environment Configuration
# Copy this file to .env for production deployment
# CRITICAL: Update ALL values before deploying
# Server Configuration
NODE_ENV=production
PORT=3000
API_PREFIX=/api/v1
# Database - Use managed database service (AWS RDS, Google Cloud SQL, etc.)
# NEVER commit real credentials
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DATABASE?sslmode=require
# JWT Configuration
# Generate strong secret: openssl rand -base64 64
JWT_SECRET=REPLACE_WITH_STRONG_RANDOM_SECRET_MINIMUM_64_CHARACTERS
JWT_EXPIRATION=1h
JWT_MAX_AGE=3600
# CORS - Comma-separated list of allowed origins
CORS_ORIGIN=https://app.alian-structure.com,https://www.alian-structure.com
# AI Services
OPENAI_API_KEY=
GROK_API_KEY=
LLAMA_API_BASE_URL=
# Blockchain
ETH_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
CHAIN_ID=1
# Redis (use managed Redis service)
REDIS_URL=redis://USER:PASSWORD@HOST:6379
# Logging
LOG_LEVEL=error
# Sentry Error Tracking
SENTRY_DSN=
SENTRY_ENVIRONMENT=production
SENTRY_RELEASE=1.0.0
SENTRY_TRACES_SAMPLE_RATE=0.05
# Observability — OpenTelemetry tracing + Prometheus metrics
# Toggle distributed tracing on/off. Disable to remove all tracing overhead.
TRACING_ENABLED=true
# Fraction of traces to sample (0.0–1.0). Keep low in production to bound overhead.
OTEL_TRACES_SAMPLER_RATIO=0.1
# OTLP/HTTP traces endpoint (Jaeger 1.41+, Tempo, or an OTel collector).
OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
# REQUIRED in production: shared bearer token guarding /observability/metrics.
# Prometheus must send it via `Authorization: Bearer <token>`.
METRICS_AUTH_TOKEN=CHANGE_ME_TO_A_LONG_RANDOM_SECRET
# Email Service - Use production SMTP (SendGrid, AWS SES, etc.)
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_SECURE=true
SMTP_USER=apikey
SMTP_PASSWORD=YOUR_SENDGRID_API_KEY
EMAIL_FROM=noreply@alian-structure.com
EMAIL_VERIFICATION_URL=https://api.alian-structure.com/api/v1/auth/verify-email
# Rate Limiting
# Free users: 100 req/min, paid users: 1000 req/min, enterprise users: 10000 req/min
RATE_LIMIT_FREE_PER_MINUTE=100
RATE_LIMIT_PAID_PER_MINUTE=1000
RATE_LIMIT_ENTERPRISE_PER_MINUTE=10000
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_BURST_MULTIPLIER=1.2
# Distributed rate limiting (Redis-backed)
RATE_LIMIT_DEFAULT_STRATEGY=token-bucket
RATE_LIMIT_REDIS_KEY_PREFIX=alian:rl:
RATE_LIMIT_FALLBACK_TO_MEMORY=false
# Security Headers
HSTS_MAX_AGE=31536000
# Session Configuration
SESSION_SECRET=REPLACE_WITH_STRONG_RANDOM_SECRET_MINIMUM_32_CHARACTERS