-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy path.env.example
More file actions
145 lines (107 loc) · 3.98 KB
/
.env.example
File metadata and controls
145 lines (107 loc) · 3.98 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
# Environment Configuration Template for Redis Caching Layer
# Copy this to .env and adjust values for your environment
# ============================================
# Database Configuration
# ============================================
DATABASE_URL=postgresql://postgres:postgres@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=your-secret-key-change-in-production
# ============================================
# 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
# 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
# ============================================
# 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
# Enable CORS for development
CORS_ENABLED=true
CORS_ORIGIN=http://localhost:3000