forked from StellarRoute/StellarRoute
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
108 lines (89 loc) · 5.68 KB
/
Copy path.env.example
File metadata and controls
108 lines (89 loc) · 5.68 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
# StellarRoute — minimal local development environment
# Full reference: docs/development/environment-variables.md
# ── Database (required) ──────────────────────────────────────────────
DATABASE_URL=postgresql://stellarroute:stellarroute_dev@localhost:5432/stellarroute
# ── Redis (optional; enables quote cache + Redis-backed rate limits) ─
REDIS_URL=redis://localhost:6379
# ── Stellar / Soroban (required for indexer) ───────────────────────────
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# Optional comma-separated failover URLs tried if the primary is unreachable:
# STELLAR_HORIZON_FALLBACK_URLS=https://horizon.stellar.org,https://horizon-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Optional comma-separated failover URLs tried if the primary is unreachable:
# SOROBAN_RPC_FALLBACK_URLS=https://soroban-rpc.stellar.org
# Pick exactly ONE network block below. Horizon and Soroban RPC MUST point at
# the same network: a mixed pair (e.g. mainnet Horizon + testnet Soroban) makes
# SDEX and AMM liquidity describe two different ledgers and is unsupported.
# Canonical URLs per network live in `config/networks.json`.
# ── Testnet (default) ──
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org:443
NEXT_PUBLIC_STELLAR_NETWORK=testnet
# Network passphrase (reference): "Test SDF Network ; September 2015"
# Copy the router ID from the committed deploy artifact:
# jq -r .router_contract_id config/deployments/testnet.json
ROUTER_CONTRACT_ADDRESS=
# ── Mainnet (comment out the testnet block above before enabling) ──
# STELLAR_HORIZON_URL=https://horizon.stellar.org
# SOROBAN_RPC_URL=https://soroban-rpc.mainnet.stellar.org:443
# NEXT_PUBLIC_STELLAR_NETWORK=mainnet
# Network passphrase (reference): "Public Global Stellar Network ; September 2015"
# ROUTER_CONTRACT_ADDRESS=
# ── API server (optional overrides) ──────────────────────────────────
# API_HOST=127.0.0.1 # local default (loopback)
# API_PORT=3000
#
# PaaS / production binding (Render, Fly, Railway, K8s):
# Set PORT (injected automatically by most PaaS platforms) — the server
# will bind 0.0.0.0:$PORT. Override the host with API_HOST if needed.
# PORT=3000
# API_HOST=0.0.0.0 # required for PaaS; set explicitly if PORT is absent
# ── Deployment profile / security (see docs/development/environment-variables.md) ──
# Set to `production` for public deployments. Flips CORS and REQUIRE_AUTH to
# their hardened defaults and locks down /metrics + /api/v1/replay/*.
# STELLARROUTE_ENV=production
# CSV allowlist of exact browser origins allowed to call the API. Required
# (non-empty) when STELLARROUTE_ENV=production or REQUIRE_STRICT_CORS=1.
# Include your deployed frontend origin(s), e.g. custom domain + Vercel:
# CORS_ALLOWED_ORIGINS=https://www.stellarroute.app,https://stellarroute.app,https://stellarroute-frontend.vercel.app
# Opt into the production CORS allowlist behavior without setting
# STELLARROUTE_ENV=production (e.g. an internet-facing staging environment).
# REQUIRE_STRICT_CORS=1
# Integrator API keys (CSV) accepted by the x-api-key header or
# `Authorization: Bearer <key>`.
# API_KEYS=
# Require a valid API key on every request. Defaults to `true` in production
# and `false` otherwise; set explicitly to override either default.
# REQUIRE_AUTH=true
# CSV allowlist of route path prefixes that stay reachable via
# unauthenticated GET even when REQUIRE_AUTH=true (e.g. public quote reads
# for a browser frontend). Never bypasses non-GET methods.
# PUBLIC_GET_ROUTES=/api/v1/quote,/api/v1/pairs,/api/v1/markets,/api/v1/orderbook,/api/v1/routes,/api/v1/price-history
# Break-glass override: acknowledges running STELLARROUTE_ENV=production
# with REQUIRE_AUTH=false. Without this, the API refuses to start in that
# configuration. Do not set this in a real production deployment.
# ALLOW_INSECURE_PUBLIC_API=1
# Bearer token for admin/operator endpoints (/api/v1/admin/*,
# /api/v1/system/*) and, in production, /metrics + /api/v1/replay/*.
# ADMIN_AUTH_TOKEN=
# ── Observability (optional) ───────────────────────────────────────────
# RUST_LOG=info
# LOG_FORMAT=pretty
# ── Liquidity thinness alerts (optional) ───────────────────────────────
# Webhook URL to send alerts (if not set, alerts are disabled)
LIQUIDITY_THINNESS_ALERT_WEBHOOK_URL=
# Thresholds for trading pairs (JSON string)
LIQUIDITY_THINNESS_ALERT_THRESHOLDS='{"native/USDC":{"min_bid_depth":10000.0,"min_ask_depth":10000.0,"cooldown_seconds":300}}'
# Retry delay for failed webhook calls (default 2000ms)
LIQUIDITY_THINNESS_ALERT_RETRY_DELAY_MS=2000
# ── Circle CCTP v2 bridge (API; default off) ───────────────────────────
# CCTP_ENABLED=false
# Required when enabled (generate locally; never commit):
# CCTP_ACCESS_TOKEN_HMAC_KEY=
# Explicit Sepolia RPC (development/test only — no implicit rpc.sepolia.org):
# CCTP_SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
# Optional alias: SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
# Stellar RPC precedence: CCTP_STELLAR_RPC_URL → STELLAR_RPC_URL → SOROBAN_RPC_URL
# CCTP_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
# Opt-in local configured-ready proof (disposable Postgres + live Testnet deps):
# ./scripts/cctp-configured-ready-proof.sh