-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
246 lines (200 loc) · 7.28 KB
/
.env.example
File metadata and controls
246 lines (200 loc) · 7.28 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# QuasarFlow API - Environment Configuration
# Copy this file to .env and customize for your environment
# Never commit .env to version control
# ========================================
# Environment Configuration
# ========================================
# Environment type: development, staging, production
ENV=development
# Docker Compose project name (prevents container conflicts)
COMPOSE_PROJECT_NAME=quasarflow
# ========================================
# Server Configuration
# ========================================
# Server port (format: :8080 or just 8080)
PORT=:8080
# Port to expose on host machine
API_PORT=8080
# API version tag for Docker image
API_VERSION=latest
# ========================================
# Database Configuration
# ========================================
# PostgreSQL database name
POSTGRES_DB=quasarflow
# PostgreSQL username
POSTGRES_USER=stellar
# PostgreSQL password (CHANGE THIS FOR PRODUCTION)
POSTGRES_PASSWORD=stellar123
# PostgreSQL port
POSTGRES_PORT=5432
# Full database URL (auto-constructed in Docker, customize for external DB)
# For Docker: postgresql://stellar:stellar123@postgres:5432/quasarflow?sslmode=disable
# For external: postgresql://user:pass@external-db:5432/dbname?sslmode=require
# DATABASE_URL=postgresql://stellar:stellar123@localhost:5432/quasarflow?sslmode=disable
# ========================================
# Stellar Network Configuration
# ========================================
# Stellar network: local, testnet, mainnet
STELLAR_NETWORK=local
# Stellar Docker image version
STELLAR_VERSION=latest
# Stellar Horizon API port (for local/testnet development)
STELLAR_HORIZON_PORT=8000
# Stellar Core port (for debugging)
STELLAR_CORE_PORT=11626
# Enable Stellar logs (true/false)
STELLAR_ENABLE_LOGS=true
# Stellar Horizon URL (configure based on your network choice above)
# For local: http://localhost:8000
# For testnet: https://horizon-testnet.stellar.org
# For mainnet: https://horizon.stellar.org
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# Friendbot URL (for funding wallets in test environments)
# For testnet: https://horizon-testnet.stellar.org/friendbot
# For local: http://localhost:8000/friendbot
# For mainnet: leave empty (no friendbot available)
FRIENDBOT_URL=https://horizon-testnet.stellar.org/friendbot
# ========================================
# Security Configuration
# ========================================
# AES-256 encryption key for private keys (MUST be 32 bytes)
# Generate with: openssl rand -base64 32
# CRITICAL: Change this for production and keep it secure
ENCRYPTION_KEY=YourSecure32ByteEncryptionKeyHere!!
# JWT secret for API authentication (future feature)
# JWT_SECRET=your-jwt-secret-change-in-production
# ========================================
# Logging Configuration
# ========================================
# Log level: debug, info, warn, error
LOG_LEVEL=info
# ========================================
# Rate Limiting Configuration
# ========================================
# Requests per minute per IP
RATE_LIMIT=100
# Burst limit for rate limiting
RATE_LIMIT_BURST=200
# ========================================
# Migration Configuration
# ========================================
# Database migration tool version
MIGRATE_VERSION=latest
# ========================================
# CORS Configuration
# ========================================
# Enable CORS (true/false)
CORS_ENABLED=true
# Allowed CORS origins (comma-separated)
# Development: http://localhost:3000,http://localhost:8080
# Production: https://yourdomain.com,https://app.yourdomain.com
CORS_ORIGINS=http://localhost:3000,http://localhost:8080
# API Base URL (for documentation and testing)
API_BASE_URL=http://localhost:8080
# Frontend URL (for CORS and CSP policies)
FRONTEND_URL=http://localhost:3000
# Content Security Policy - Allowed domains for CSP connect-src directive
# Comma-separated list of allowed domains
CSP_CONNECT_SOURCES=https://horizon-testnet.stellar.org,https://horizon.stellar.org,http://localhost:8000
# ========================================
# Development Features (set to false in production)
# ========================================
# Enable debug mode
DEBUG=true
# Allow database seeding with test data
SEED_DATABASE=false
# Enable test endpoints for development
ENABLE_TEST_ENDPOINTS=false
# ========================================
# Production Features (uncomment for production)
# ========================================
# SSL/TLS Configuration
# SSL_ENABLED=false
# SSL_CERT_PATH=/etc/ssl/certs/server.crt
# SSL_KEY_PATH=/etc/ssl/private/server.key
# Monitoring and Metrics
# METRICS_ENABLED=false
# PROMETHEUS_PORT=9090
# HEALTH_CHECK_INTERVAL=30s
# Backup Configuration
# BACKUP_ENABLED=false
# BACKUP_SCHEDULE=0 2 * * *
# BACKUP_RETENTION_DAYS=30
# Alert Configuration
# ALERT_EMAIL=ops@yourdomain.com
# SLACK_WEBHOOK_URL=
# ========================================
# External Services (optional)
# ========================================
# Redis for caching (future feature)
# REDIS_URL=redis://localhost:6379
# Email service configuration (future feature)
# EMAIL_SERVICE_URL=
# EMAIL_API_KEY=
# ========================================
# Docker Configuration
# ========================================
# Restart policy for containers
RESTART_POLICY=unless-stopped
# Health check configuration
HEALTH_CHECK_INTERVAL=30s
HEALTH_CHECK_TIMEOUT=10s
HEALTH_CHECK_RETRIES=3
# ========================================
# Performance Configuration
# ========================================
# Maximum database connections
# MAX_DB_CONNECTIONS=25
# Connection timeout
# CONNECTION_TIMEOUT=30s
# Idle timeout
# IDLE_TIMEOUT=120s
# ========================================
# Environment-Specific Examples
# ========================================
# DEVELOPMENT EXAMPLE (Local Stellar):
# ENV=development
# STELLAR_NETWORK=local
# STELLAR_HORIZON_URL=http://localhost:8000
# FRIENDBOT_URL=http://localhost:8000/friendbot
# LOG_LEVEL=debug
# DEBUG=true
# POSTGRES_DB=quasarflow_dev
# CORS_ORIGINS=http://localhost:3000,http://localhost:8080
# API_BASE_URL=http://localhost:8080
# FRONTEND_URL=http://localhost:3000
# CSP_CONNECT_SOURCES=http://localhost:8000
# ENCRYPTION_KEY=DevOnlyKey32BytesLongForTesting!!
# STAGING EXAMPLE (Testnet):
# ENV=staging
# STELLAR_NETWORK=testnet
# STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# FRIENDBOT_URL=https://horizon-testnet.stellar.org/friendbot
# LOG_LEVEL=info
# DEBUG=false
# POSTGRES_DB=quasarflow_staging
# COMPOSE_PROJECT_NAME=quasarflow-staging
# CORS_ORIGINS=http://localhost:3000,https://staging.yourdomain.com
# API_BASE_URL=https://api-staging.yourdomain.com
# FRONTEND_URL=https://staging.yourdomain.com
# CSP_CONNECT_SOURCES=https://horizon-testnet.stellar.org
# ENCRYPTION_KEY=StagingKey32BytesForTestingOnly!!
# PRODUCTION EXAMPLE (Mainnet):
# ENV=production
# STELLAR_NETWORK=mainnet
# STELLAR_HORIZON_URL=https://horizon.stellar.org
# FRIENDBOT_URL=
# LOG_LEVEL=info
# DEBUG=false
# POSTGRES_DB=quasarflow
# POSTGRES_PASSWORD=SecureProductionPassword123!
# COMPOSE_PROJECT_NAME=quasarflow-prod
# CORS_ORIGINS=https://yourdomain.com,https://app.yourdomain.com
# API_BASE_URL=https://api.yourdomain.com
# FRONTEND_URL=https://yourdomain.com
# CSP_CONNECT_SOURCES=https://horizon.stellar.org
# ENCRYPTION_KEY=SecureProductionKey32BytesLong!!
# SSL_ENABLED=true
# METRICS_ENABLED=true
# BACKUP_ENABLED=true