forked from Fluxora-Org/Fluxora-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
117 lines (97 loc) · 4.52 KB
/
Copy path.env.example
File metadata and controls
117 lines (97 loc) · 4.52 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
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/indexer_db
# Indexer Configuration
REPLAY_BATCH_SIZE=1000
PORT=3000
NODE_ENV=production
# =============================================================================
# PostgreSQL Database (docker-compose)
# =============================================================================
POSTGRES_USER=fluxora
POSTGRES_PASSWORD=fluxora_secure_password
POSTGRES_DB=fluxora
POSTGRES_PORT=5432
# Database Connection Pool Settings
DB_POOL_MIN=2
DB_POOL_MAX=10
DB_CONNECTION_TIMEOUT=5000
DB_IDLE_TIMEOUT=30000
# Max requests allowed to queue before fast-failing with 503 (default 50)
POOL_QUEUE_LIMIT=50
# Read-replica URL (optional — omit to use primary for all queries)
# When set, SELECT queries on streams are routed through a dedicated replica pool.
# DATABASE_REPLICA_URL=postgresql://readonly_user:password@replica-host:5432/fluxora
# Full DATABASE_URL (auto-generated in docker-compose, override if needed)
DATABASE_URL=postgresql://fluxora:fluxora_secure_password@localhost:5432/fluxora
# =============================================================================
# Redis Cache (optional - enable with docker-compose --profile redis)
# =============================================================================
REDIS_ENABLED=true
REDIS_URL=redis://localhost:6379
REDIS_PORT=6379
# TTL (seconds) for idempotency keys on POST /api/streams (default: 86400 = 24 h)
IDEMPOTENCY_TTL_SECONDS=86400
# =============================================================================
# Stellar Network Configuration
# =============================================================================
STELLAR_NETWORK=testnet
HORIZON_URL=https://horizon-testnet.stellar.org
HORIZON_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# Contract Addresses (required for production)
CONTRACT_ADDRESS_STREAMING=
# =============================================================================
# Security & Authentication
# =============================================================================
JWT_SECRET=your-jwt-secret-min-32-chars-long
JWT_EXPIRES_IN=24h
# PII Encryption (optional — required when storing stream addresses)
# Key for encrypting sender_address and recipient_address columns in the streams table.
# If omitted, stream write/read operations will fail closed with an error.
# Minimum 32 characters. Keep this secret secure and never commit it to version control.
# PGCRYPTO_KEY=your-pgcrypto-key-min-32-chars-long
# Optional: Previous key for zero-downtime key rotation.
# When set, reads will try PGCRYPTO_KEY first, then fall back to this key.
# PGCRYPTO_KEY_PREVIOUS=your-previous-pgcrypto-key-min-32-chars
API_KEYS=api-key-1,api-key-2
# Server-side pepper mixed into every API-key hash (min 32 chars). Keep this out
# of the database and never log it. Rotating it invalidates all existing keys.
API_KEY_PEPPER=your-api-key-pepper-min-32-chars-long
INDEXER_WORKER_TOKEN=your-indexer-worker-token-min-32-chars
# Server-Sent Events connection hardening
# Limits apply to GET /api/streams/:id/events before text/event-stream headers are flushed.
SSE_MAX_CONNECTIONS_PER_IP=10
SSE_MAX_GLOBAL_CONNECTIONS=1000
SSE_MAX_CONNECTION_DURATION_MS=1800000
SSE_RETRY_AFTER_SECONDS=15
WS_AUTH_REQUIRED=false
# =============================================================================
# Request Handling
# =============================================================================
MAX_REQUEST_SIZE=1mb
MAX_JSON_DEPTH=20
REQUEST_TIMEOUT_MS=30000
# =============================================================================
# Observability
# =============================================================================
LOG_LEVEL=info
METRICS_ENABLED=true
# OpenTelemetry distributed tracing
# Set OTEL_SDK_DISABLED=true to turn off tracing entirely (zero overhead).
OTEL_SDK_DISABLED=false
OTEL_SERVICE_NAME=fluxora-backend
# Base URL of your OTLP collector (Jaeger all-in-one, Grafana Tempo, etc.)
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Optional comma-separated auth headers: key=value,key2=value2
# Example: OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <token>
OTEL_EXPORTER_OTLP_HEADERS=
# =============================================================================
# Webhooks (optional)
# =============================================================================
WEBHOOK_URL=
WEBHOOK_SECRET=
WEBHOOK_POLL_INTERVAL_MS=10000
WEBHOOK_BATCH_SIZE=10
# Database configuration
DATABASE_URL=postgresql://user:password@localhost:5432/fluxora
# Auth (Future additions)
# JWT_SECRET=your-secret-here