forked from FinesseStudioLab/Trivela
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
105 lines (88 loc) · 4.35 KB
/
Copy path.env.example
File metadata and controls
105 lines (88 loc) · 4.35 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
# Trivela Backend Environment Configuration
# Copy this file to .env and fill in your values
# Server Configuration
PORT=3001
# Database backend (issue #284).
#
# - Unset / not starting with `postgres://` -> SQLite (better-sqlite3),
# appropriate for dev and single-instance deployments.
# - postgres:// or postgresql:// URL -> PostgreSQL for campaigns + audit logs.
# Required for multi-instance / horizontally scaled deployments.
#
# DATABASE_URL=postgres://trivela:trivela@localhost:5432/trivela
# PG_POOL_MAX=10
#
# Optional: when set, the dal/pg tests connect to this database and verify the
# repositories CRUD end to end. Leave unset to skip those tests in CI on
# branches that don't have a Postgres service.
# TEST_DATABASE_URL=postgres://trivela:trivela@localhost:5432/trivela_test
# Stellar Network Configuration
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Multi-RPC failover pool (comma-separated). When set, takes precedence over SOROBAN_RPC_URL.
# Requests round-robin across healthy endpoints; a failed node backs off for 30 s then recovers.
# SOROBAN_RPC_URLS=https://soroban-testnet.stellar.org,https://rpc.ankr.com/stellar_testnet
HORIZON_URL=https://horizon-testnet.stellar.org
# Optional override when using a non-standard passphrase for the selected network preset
# STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# CORS Configuration
# For multiple origins, use comma-separated list
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
# Optional: Legacy single-origin CORS (fallback if CORS_ALLOWED_ORIGINS not set)
# CORS_ORIGIN=http://localhost:5173
# API Key Authentication (optional)
# If set, write endpoints (POST, PUT, DELETE) require a valid key
# Leave empty or unset for development (all endpoints open)
# TRIVELA_API_KEYS=sk_prod_old_key,sk_prod_new_key
# Legacy single key (still supported)
# TRIVELA_API_KEY=sk_prod_your_secure_key_here
# Master admin key for API key management endpoints (POST/GET/DELETE /api/v1/admin/api-keys)
# TRIVELA_MASTER_KEY=mk_prod_master_key_here
# Campaign categories (comma-separated controlled vocabulary)
# TRIVELA_CATEGORIES=DeFi,NFT,Community,Airdrop
# Image storage backend: local | s3 | ipfs
STORAGE_BACKEND=local
UPLOAD_DIR=./uploads
UPLOAD_PUBLIC_BASE_URL=http://localhost:3001/uploads
# S3 storage (when STORAGE_BACKEND=s3)
# S3_BUCKET=trivela-campaign-images
# AWS_REGION=us-east-1
# S3_PUBLIC_BASE_URL=https://cdn.example.com
# IPFS storage (when STORAGE_BACKEND=ipfs)
# IPFS_API_KEY=your_pinata_or_web3_storage_key
# IPFS_API_URL=https://api.pinata.cloud/pinning/pinFileToIPFS
# IPFS_GATEWAY_URL=https://gateway.pinata.cloud/ipfs
# Smart Contract IDs (optional)
# These are exposed via GET /api/v1/config
# REWARDS_CONTRACT_ID=CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
# CAMPAIGN_CONTRACT_ID=CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
# Rate Limiting Configuration
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=60
# Redis Configuration (optional)
# When set, rate limiting state is stored in Redis for horizontal scaling
# Leave empty to use in-memory rate limiter (default for local dev)
# REDIS_URL=redis://localhost:6379
# Or use separate host/port:
# REDIS_HOST=localhost:6379
# Background Job Runner (Issue #286)
# Total attempts before a job is moved to the failed_jobs dead-letter table.
# JOB_MAX_RETRIES=5
# Base delay in milliseconds for exponential backoff between retries
# (effective delay is JOB_BASE_DELAY_MS * 2^(attempt-1) + jitter, capped at JOB_MAX_DELAY_MS).
# JOB_BASE_DELAY_MS=1000
# Upper bound for retry backoff in milliseconds.
# JOB_MAX_DELAY_MS=30000
# OpenTelemetry distributed tracing (#288)
# Service identification in traces.
OTEL_SERVICE_NAME=trivela-backend
# OTLP/HTTP endpoint (Jaeger 1.35+, OTel Collector, Honeycomb, Tempo, etc.).
# Leave unset in dev to disable export — `withSpan()` still works as a no-op.
# OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318
# Optional auth headers (comma-separated key=value).
# OTEL_EXPORTER_OTLP_HEADERS=x-honeycomb-team=YOUR_KEY,x-honeycomb-dataset=trivela
# Deployment Strategy
# Set to blue-green to enable the blue/green deployment script (scripts/deploy-blue-green.sh).
# When using blue-green, the deploy script manages two backend environments on different ports
# (blue: 3001, green: 3002) and atomically switches nginx traffic after health verification.
DEPLOY_STRATEGY=blue-green