-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy path.env.example
More file actions
194 lines (145 loc) · 5.97 KB
/
Copy path.env.example
File metadata and controls
194 lines (145 loc) · 5.97 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# Environment Configuration Template for Redis Caching Layer
# Copy this to .env and adjust values for your environment
# ============================================
# Database Configuration
# ============================================
DATABASE_URL=postgresql://postgres:CHANGE_THIS_PASSWORD@localhost:5432/web3-student-lab?schema=public
# ============================================
# Redis Configuration - Choose one mode
# ============================================
# Redis Mode: standalone, sentinel, or cluster
REDIS_MODE=standalone
# ============================================
# STANDALONE MODE (Development)
# ============================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# ============================================
# SENTINEL MODE (High Availability)
# ============================================
# Uncomment these and set REDIS_MODE=sentinel to use Sentinel
# REDIS_SENTINELS=localhost:26379,localhost:26380,localhost:26381
# REDIS_SENTINEL_NAME=mymaster
# REDIS_SENTINEL_PASSWORD=
# ============================================
# CLUSTER MODE (Distributed)
# ============================================
# Uncomment these and set REDIS_MODE=cluster to use Cluster
# REDIS_CLUSTER_NODES=localhost:6381,localhost:6382,localhost:6383
# REDIS_CLUSTER_PASSWORD=
# ============================================
# Cache Warming Configuration
# ============================================
# Interval (in milliseconds) for periodic cache warming
CACHE_WARMING_INTERVAL=300000 # 5 minutes
# Interval (in milliseconds) for polling new blocks
BLOCK_POLL_INTERVAL=10000 # 10 seconds
# ============================================
# Instance Configuration
# ============================================
# Unique identifier for this backend instance (used in clustering)
INSTANCE_ID=backend-1
# Node environment
NODE_ENV=development
# ============================================
# JWT Configuration
# ============================================
JWT_SECRET=CHANGE_THIS_SECRET_KEY
# ============================================
# Application Configuration
# ============================================
# Stellar Network: testnet, mainnet, or local
STELLAR_NETWORK=testnet
# Soroban RPC URL
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Horizon API URL
HORIZON_URL=https://horizon-testnet.stellar.org
# Certificate Contract ID
CERTIFICATE_CONTRACT_ID=
# API Base URL
API_BASE_URL=http://localhost:8080
# Token buyback indexer adapter URL (server-only). It must implement the
# response documented in docs/api/tokenomics-buybacks.md. Do not point the
# frontend directly at this URL, especially when it needs an API key.
BUYBACK_INDEXER_URL=
# Certificate Metadata Base URL
CERT_METADATA_BASE_URL=http://localhost:8080
# Certificate Image Base Path
CERT_IMAGE_BASE_PATH=
# Verification URL
VERIFICATION_URL=http://localhost:8080/api/v1/certificates/verify
# Issuer DID
ISSUER_DID=did:stellar:GBRPYHIL2CI3FYQMWVUGE62KMGOBQKLCYJ3HLKBUBIW5VZH4S4MNOWT
# Issuer Name
ISSUER_NAME=Web3 Student Lab
# Comma-separated list of issuer DIDs authorized to revoke/reissue
# certificates. Revoke/reissue requests from any other DID are rejected
# with 403 and recorded in the audit log. Defaults to ISSUER_DID if unset.
AUTHORIZED_ISSUER_DIDS=did:stellar:GBRPYHIL2CI3FYQMWVUGE62KMGOBQKLCYJ3HLKBUBIW5VZH4S4MNOWT
# ============================================
# Logging Configuration
# ============================================
# Log level: debug, info, warn, error
LOG_LEVEL=info
# ============================================
# Cache Configuration (Advanced)
# ============================================
# Maximum memory for Redis (used in docker-compose)
# Examples: 256mb, 512mb, 1gb
REDIS_MAX_MEMORY=256mb
# Memory eviction policy
# Options: noeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, volatile-ttl, volatile-random, allkeys-random
REDIS_MAX_MEMORY_POLICY=allkeys-lru
# Enable Redis persistence
REDIS_APPEND_ONLY=yes
# ============================================
# Performance Tuning
# ============================================
# Database connection pool size
DB_POOL_MIN=5
DB_POOL_MAX=20
# Request timeout (milliseconds)
REQUEST_TIMEOUT=30000
# RPC call timeout (milliseconds)
RPC_TIMEOUT=10000
# ============================================
# Development/Debugging
# ============================================
# Enable debug logging for cache operations
DEBUG_CACHE=false
# Enable debug logging for RPC calls
DEBUG_RPC=false
# ============================================
# CORS Configuration
# ============================================
# Comma-separated list of allowed origins.
# In production, set this explicitly to your deployed frontend URL(s).
CORS_ORIGIN=http://localhost:3000,http://localhost:5173,http://localhost:8080
# Optional extra dev origins; used when CORS_ORIGIN is unset (non-production only).
# CORS_ALLOWED_DEV_ORIGINS=http://localhost:3000,http://localhost:5173
# ============================================
# Webhook Delivery
# ============================================
# Secret used to sign outbound webhook deliveries
WEBHOOK_SIGNING_SECRET=CHANGE_THIS_WEBHOOK_SIGNING_SECRET
# Secret used to verify inbound webhook dispatch requests
WEBHOOK_INGEST_SECRET=CHANGE_THIS_WEBHOOK_INGEST_SECRET
# Retry configuration for BullMQ webhook jobs
WEBHOOK_MAX_ATTEMPTS=5
WEBHOOK_BACKOFF_DELAY_MS=1000
WEBHOOK_REQUEST_TIMEOUT_MS=10000
WEBHOOK_WORKER_CONCURRENCY=25
# ============================================
# Security Headers Configuration
# ============================================
# Frontend URL for CORS and CSP
FRONTEND_URL=http://localhost:3000
# Content Security Policy Configuration
# Set to 'true' to enable report-only mode for testing CSP violations without blocking
CSP_REPORT_ONLY=false
# CSP Report URI (optional) - endpoint to receive CSP violation reports
# CSP_REPORT_URI=https://your-csp-report-endpoint.com/api/csp-reports
# Backend CSP Configuration
# Set to 'true' to enable report-only mode for backend CSP
BACKEND_CSP_REPORT_ONLY=false