forked from Bonizozo/stellar-tipjar-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
93 lines (81 loc) · 3.74 KB
/
Copy path.env.example
File metadata and controls
93 lines (81 loc) · 3.74 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
DATABASE_URL=postgres://postgres:password@localhost/tipjar
STELLAR_NETWORK=testnet
STELLAR_RPC_URL=https://soroban-testnet.stellar.org
PORT=8000
# JWT Authentication
# Required — must be a long, random secret (min 32 chars recommended).
# Generate with: openssl rand -hex 32
JWT_SECRET=change-me-to-a-long-random-secret
# Vault secrets management (optional — falls back to env vars above when unset)
# VAULT_ADDR=http://vault:8200
# VAULT_TOKEN=<vault-token>
# VAULT_MOUNT=secret # KV v2 mount path (default: secret)
# VAULT_PATH=stellar-tipjar # Secret path within the mount
# Tip amount limits (XLM)
TIP_MIN_XLM=0.01
TIP_MAX_XLM=10000
# Comma-separated list of allowed CORS origins (no wildcards in production)
ALLOWED_ORIGINS=http://localhost:3000
# Redis (optional — caching is skipped gracefully if unavailable)
REDIS_URL=redis://127.0.0.1:6379
# Rate limiting (token bucket, IP-based)
# General read endpoints
RATE_LIMIT_PER_SECOND=10
RATE_LIMIT_BURST_SIZE=20
# Write endpoints (POST /tips, POST /creators) — stricter
RATE_LIMIT_WRITE_PER_SECOND=2
RATE_LIMIT_WRITE_BURST_SIZE=5
# Comma-separated IPs that bypass rate limiting entirely (e.g. internal services, monitoring)
# RATE_LIMIT_WHITELIST=127.0.0.1,10.0.0.1
# Logging and observability
# Log format: "json" for structured JSON (production), anything else for human-readable text
# LOG_FORMAT=json
# Log level filter (default: stellar_tipjar_backend=debug,tower_http=debug,sqlx=warn)
# RUST_LOG=info
# OpenTelemetry distributed tracing
# ─────────────────────────────────────────────────────────────────────────────
# OTLP gRPC endpoint (Jaeger, Tempo, Honeycomb, etc.).
# Spans are only exported when this variable is set.
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
#
# Service identity tags attached to every span.
# OTEL_SERVICE_NAME=stellar-tipjar-backend
# OTEL_SERVICE_VERSION=0.1.0
#
# Deployment environment tag (production | staging | development).
# DEPLOYMENT_ENVIRONMENT=development
#
# Fraction of traces to sample: 1.0 = always, 0.1 = 10 %, 0.0 = never.
# Defaults to 1.0 (always sample). Reduce in high-traffic production environments.
# OTEL_SAMPLE_RATIO=1.0
#
# Set to "true" to print spans to stdout (useful for local development without
# a collector). Can be combined with OTEL_EXPORTER_OTLP_ENDPOINT.
# OTEL_EXPORTER_STDOUT=false
# RabbitMQ message queue (optional — queue system is disabled when unset)
# RABBITMQ_URL=amqp://guest:guest@localhost:5672/%2f
# Max delivery attempts before a message is dead-lettered (default: 3)
# RABBITMQ_MAX_RETRIES=3
# Max unacknowledged messages per consumer channel (default: 10)
# RABBITMQ_PREFETCH_COUNT=10
# API Gateway (#232)
# Maximum request body size in bytes (default: 1048576 = 1 MiB)
# GATEWAY_MAX_BODY_BYTES=1048576
# Set to "true" to wrap all API responses in a standard envelope
# GATEWAY_RESPONSE_ENVELOPE=false
# Database Sharding (#233)
# Number of shards (default: 1 = sharding disabled)
# SHARD_COUNT=2
# Sharding algorithm: hash (default) | range | directory
# SHARD_STRATEGY=hash
# DSN for each shard (0-indexed). Falls back to DATABASE_URL when not set.
# SHARD_0_DSN=postgres://user:password@shard0-host/tipjar_shard0
# SHARD_1_DSN=postgres://user:password@shard1-host/tipjar_shard1
# Max / min connections per shard pool
# SHARD_MAX_CONNECTIONS=10
# SHARD_MIN_CONNECTIONS=2
# Multi-currency support# Optional: Open Exchange Rates API key (https://openexchangerates.org)
# If unset, falls back to the free exchangerate.host API (no key required)
# EXCHANGE_RATE_API_KEY=your_key_here
# How often to refresh exchange rates in seconds (default: 3600 = 1 hour)
# EXCHANGE_RATE_REFRESH_SECS=3600