forked from CloudBoost/cloudboost
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
213 lines (176 loc) · 7.11 KB
/
Copy path.env.example
File metadata and controls
213 lines (176 loc) · 7.11 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
# EzyBackend Environment Configuration
# Copy this file to .env and update with your actual values
# =============================================================================
# GENERAL CONFIGURATION
# =============================================================================
NODE_ENV=production
DOMAIN=localhost
# =============================================================================
# SERVICE PORTS
# =============================================================================
DATA_SERVICE_PORT=4730
USER_SERVICE_PORT=3000
DASHBOARD_PORT=1440
ANALYTICS_UI_PORT=5555
ACCOUNTS_UI_PORT=1447
HOME_UI_PORT=1444
HTTP_PORT=80
HTTPS_PORT=443
# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
# MongoDB Settings
MONGO_USERNAME=ezybackend
MONGO_PASSWORD=your-secure-mongodb-password
MONGO_DATABASE=ezybackend
MONGO_PORT=27017
# Redis Settings
REDIS_PASSWORD=your-secure-redis-password
REDIS_PORT=6379
# =============================================================================
# SECURITY CONFIGURATION
# =============================================================================
# JWT Secret (Generate a strong random string)
JWT_SECRET=your-jwt-secret-key-change-in-production
# Encryption Key (Generate a strong random string)
ENCRYPTION_KEY=your-encryption-key-change-in-production
# =============================================================================
# OAUTH PROVIDERS (Optional)
# =============================================================================
# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# Facebook OAuth
FACEBOOK_APP_ID=your-facebook-app-id
FACEBOOK_APP_SECRET=your-facebook-app-secret
# Twitter OAuth
TWITTER_CONSUMER_KEY=your-twitter-consumer-key
TWITTER_CONSUMER_SECRET=your-twitter-consumer-secret
# GitHub OAuth
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
# LinkedIn OAuth
LINKEDIN_CLIENT_ID=your-linkedin-client-id
LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
# =============================================================================
# EMAIL PROVIDERS (Choose one)
# =============================================================================
# Email Provider (mailgun, sendgrid, mandrill, smtp)
MAIL_PROVIDER=mailgun
MAIL_PROVIDER_API_KEY=your-mail-provider-api-key
# Mailgun Settings
MAILGUN_API_KEY=your-mailgun-api-key
MAILGUN_DOMAIN=your-mailgun-domain
# SendGrid Settings
SENDGRID_API_KEY=your-sendgrid-api-key
# Mandrill Settings
MANDRILL_API_KEY=your-mandrill-api-key
# SMTP Settings (Alternative to API providers)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
# Email Defaults
FROM_EMAIL=noreply@yourdomain.com
FROM_NAME=EzyBackend
# =============================================================================
# PAYMENT PROCESSING (Optional)
# =============================================================================
# Stripe Settings
STRIPE_SECURE_KEY=sk_test_your-stripe-secret-key
STRIPE_ENDPOINT_SECRET=whsec_your-stripe-webhook-secret
# =============================================================================
# ANALYTICS & MONITORING (Optional)
# =============================================================================
# Analytics Service
ANALYTICS_URL=http://localhost:5555
ANALYTICS_KEY=your-analytics-key
# Logging
LOG_LEVEL=info
ENABLE_METRICS=true
# Loggly (Optional)
LOGGLY_TOKEN=your-loggly-token
LOGGLY_SUBDOMAIN=your-loggly-subdomain
LOGGLY_TAGS=ezybackend,production
# =============================================================================
# SLACK NOTIFICATIONS (Optional)
# =============================================================================
SLACK_WEBHOOK=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
SLACK_CHANNEL=#alerts
SLACK_ICON_URL=https://ezybackend.io/icon.png
# =============================================================================
# CLOUD STORAGE (Optional)
# =============================================================================
# AWS S3
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_REGION=us-east-1
AWS_S3_BUCKET=your-s3-bucket
# Google Cloud Storage
GOOGLE_CLOUD_PROJECT_ID=your-gcp-project-id
GOOGLE_CLOUD_KEY_FILE=path/to/service-account.json
# =============================================================================
# DEVELOPMENT SETTINGS
# =============================================================================
# Set to true for development
DEBUG=false
VERBOSE_LOGGING=false
# Hot reloading (development only)
HOT_RELOAD=false
# =============================================================================
# PRODUCTION OPTIMIZATIONS
# =============================================================================
# Cluster mode (set to 'max' for all CPU cores)
CLUSTER_WORKERS=2
# Memory limits
NODE_OPTIONS=--max-old-space-size=2048
# =============================================================================
# BACKUP CONFIGURATION (Optional)
# =============================================================================
# Backup settings
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *
BACKUP_RETENTION_DAYS=7
BACKUP_S3_BUCKET=your-backup-bucket
# =============================================================================
# SSL/TLS CONFIGURATION (Production)
# =============================================================================
# SSL Certificate paths (if using custom certificates)
SSL_CERT_PATH=/etc/nginx/ssl/cert.pem
SSL_KEY_PATH=/etc/nginx/ssl/key.pem
# Let's Encrypt (if using certbot)
LETSENCRYPT_EMAIL=admin@yourdomain.com
LETSENCRYPT_DOMAINS=yourdomain.com,www.yourdomain.com
# =============================================================================
# RATE LIMITING & SECURITY
# =============================================================================
# Rate limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# CORS settings
CORS_ORIGIN=https://yourdomain.com
CORS_CREDENTIALS=true
# Security headers
HELMET_ENABLED=true
CSP_ENABLED=true
# =============================================================================
# MONITORING & HEALTH CHECKS
# =============================================================================
# Health check intervals
HEALTH_CHECK_INTERVAL=30s
HEALTH_CHECK_TIMEOUT=10s
HEALTH_CHECK_RETRIES=3
# Prometheus metrics (if enabled)
PROMETHEUS_ENABLED=false
PROMETHEUS_PORT=9090
# =============================================================================
# NOTES
# =============================================================================
# 1. Generate strong passwords for MONGO_PASSWORD and REDIS_PASSWORD
# 2. Use a cryptographically secure random string for JWT_SECRET and ENCRYPTION_KEY
# 3. Configure at least one email provider for user notifications
# 4. Set up OAuth providers for social login functionality
# 5. Configure SSL certificates for production deployment
# 6. Enable monitoring and logging for production environments
# 7. Set up regular database backups
# 8. Review and adjust rate limiting based on your usage patterns