-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
214 lines (163 loc) · 6.89 KB
/
.env.example
File metadata and controls
214 lines (163 loc) · 6.89 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
# Stack Blog Environment Configuration
# Copy this file to .env and update with your settings
# =============================================================================
# Application Configuration
# =============================================================================
# Environment: development, production, test
NODE_ENV=production
# Server configuration
PORT=3000
HOST=0.0.0.0
TRUST_PROXY=true
# =============================================================================
# Security Configuration (REQUIRED)
# =============================================================================
# Session secret (64+ characters, cryptographically secure)
# Generate with: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
SESSION_SECRET=your-super-secure-session-secret-that-is-at-least-64-characters-long
# API key for REST API access (32+ characters)
# Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
API_KEY=your-secure-api-key-change-this-in-production
# Admin password hash (generate with: npm run setup)
ADMIN_PASSWORD_HASH=$2b$12$your.bcrypt.password.hash.goes.here
# =============================================================================
# Content Configuration
# =============================================================================
# Content and media paths
CONTENT_PATH=./content
MEDIA_PATH=./content/media
# Caching configuration
CACHE_ENABLED=true
CACHE_TTL=300000
CACHE_MAX_SIZE=100
# =============================================================================
# CORS Configuration
# =============================================================================
# Allowed origins (comma-separated)
ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# =============================================================================
# Rate Limiting Configuration
# =============================================================================
# Rate limiting windows and limits
RATE_LIMIT_WINDOW=900000
# General requests per window (15 minutes)
RATE_LIMIT_GENERAL=1000
# Authentication attempts per window
RATE_LIMIT_AUTH=5
# API requests per window
RATE_LIMIT_API=100
# File uploads per hour
RATE_LIMIT_UPLOAD=50
# =============================================================================
# Search Configuration
# =============================================================================
# Search functionality
SEARCH_ENABLED=true
SEARCH_INDEX_TTL=300000
SEARCH_MAX_RESULTS=50
SEARCH_SNIPPET_LENGTH=150
# =============================================================================
# Security Headers Configuration
# =============================================================================
# Content Security Policy
CSP_ENABLED=true
# HTTP Strict Transport Security
HSTS_ENABLED=true
HSTS_MAX_AGE=31536000
# =============================================================================
# Session Configuration
# =============================================================================
# Session settings
SESSION_NAME=stackblog.sid
SESSION_MAX_AGE=86400000
SESSION_SECURE=true
SESSION_HTTP_ONLY=true
# =============================================================================
# File Upload Configuration
# =============================================================================
# Upload restrictions
UPLOAD_MAX_SIZE=10485760
UPLOAD_ALLOWED_TYPES=image/jpeg,image/png,image/gif,image/webp,application/pdf,text/plain
# =============================================================================
# Logging Configuration
# =============================================================================
# Log level: error, warn, info, debug
LOG_LEVEL=info
LOG_FILE=./logs/app.log
# =============================================================================
# Plugin Configuration
# =============================================================================
# Plugin system
PLUGINS_ENABLED=true
PLUGINS_PATH=./plugins
PLUGINS_AUTOLOAD=true
# =============================================================================
# Performance Configuration
# =============================================================================
# Cluster mode (for PM2)
CLUSTER_MODE=true
MAX_WORKERS=4
MEMORY_LIMIT=512
# =============================================================================
# Docker Configuration
# =============================================================================
# Docker-specific settings
DOMAIN=localhost
# Redis configuration (if using Redis profile)
REDIS_PASSWORD=changeme
# Monitoring configuration (if using monitoring profile)
GRAFANA_PASSWORD=admin
# Backup configuration (if using backup profile)
BACKUP_RETENTION_DAYS=30
# =============================================================================
# Optional: Database Configuration
# =============================================================================
# If using plugins that require a database
# DATABASE_URL=sqlite:./data/stack_blog.db
# DATABASE_HOST=localhost
# DATABASE_PORT=5432
# DATABASE_NAME=stack_blog
# DATABASE_USER=stack_blog
# DATABASE_PASSWORD=secure_password
# =============================================================================
# Optional: Email Configuration
# =============================================================================
# For plugins that send emails
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# SMTP_SECURE=false
# SMTP_USER=your-email@gmail.com
# SMTP_PASS=your-app-password
# =============================================================================
# Optional: Cloud Storage Configuration
# =============================================================================
# For plugins that use cloud storage
# AWS_ACCESS_KEY_ID=your-access-key
# AWS_SECRET_ACCESS_KEY=your-secret-key
# AWS_REGION=us-east-1
# AWS_S3_BUCKET=your-bucket-name
# =============================================================================
# Optional: Analytics Configuration
# =============================================================================
# For analytics plugins
# GOOGLE_ANALYTICS_ID=GA-XXXXXXXXX-X
# GOOGLE_ANALYTICS_4_ID=G-XXXXXXXXXX
# FACEBOOK_PIXEL_ID=xxxxxxxxxxxxxxx
# =============================================================================
# Optional: Social Media Configuration
# =============================================================================
# For social media plugins
# TWITTER_CONSUMER_KEY=your-consumer-key
# TWITTER_CONSUMER_SECRET=your-consumer-secret
# FACEBOOK_APP_ID=your-facebook-app-id
# FACEBOOK_APP_SECRET=your-facebook-app-secret
# =============================================================================
# Development-Only Configuration
# =============================================================================
# These settings should only be used in development
# Debug settings (development only)
# ENABLE_DEBUG=true
# DEBUG_LEVEL=verbose
# HOT_RELOAD=true
# Development database (development only)
# DEV_DATABASE_URL=sqlite:./dev-data/stack_blog.db