forked from fullstack-open-source/nodejs-backend-with-sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
153 lines (139 loc) · 5.96 KB
/
Copy pathexample.env
File metadata and controls
153 lines (139 loc) · 5.96 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
# ==============================================================================
# Node.js Backend - Environment Variables
# ==============================================================================
# ==============================================================================
# Application Configuration
# ==============================================================================
MODE=prod/v1
API_MODE=development
API_VERSION=1.0.0
NODE_ENV=development
DEBUG_MODE=true
# ==============================================================================
# Application Service Ports Configuration
# ==============================================================================
API_INTERNAL_PORT=3000
API_DEBUG_PORT=8900
PROXY_PORT=9080
# ==============================================================================
# Swagger/API Documentation
# ==============================================================================
API_URL=http://localhost:8900
# ==============================================================================
# CORS Configuration
# ==============================================================================
# Allowed origins (comma-separated)
CORS_ORIGINS=http://localhost:8900,http://localhost:9080
# ==============================================================================
# PostgreSQL Docker Configuration
# ==============================================================================
DATABASE_HOST=nodejs-backend-db
DATABASE_NAME=postgres
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
DATABASE_PORT=5432
DATABASE_URL=postgresql://postgres:postgres@nodejs-backend-db:5432/postgres
DATABASE_SSL=false
DB_POOL_MAX=50
DB_POOL_MIN=2
# ==============================================================================
# PG Admin Configuration
# ==============================================================================
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=admin@123
PGADMIN_PORT=5050
# ==============================================================================
# Redis Configuration
# ==============================================================================
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_URL=redis://redis:6379
# ==============================================================================
# Sentry Configuration
# ==============================================================================
SENTRY_DSN=https://xxxxxx@yyyyyyyy.ingest.us.sentry.io/zzzzzzzzzzzzzzzzzzz
SENTRY_TRACES_SAMPLE_RATE=1.0
SENTRY_PROFILES_SAMPLE_RATE=1.0
SENTRY_ENABLE_DEV=true
# ==============================================================================
# Security & Authentication
# ==============================================================================
# JWT Secret Key (CHANGE THIS IN PRODUCTION!)
# Generate a strong secret: openssl rand -base64 32
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRES_IN=7d
# ==============================================================================
# Logging Configuration
# ==============================================================================
LOG_LEVEL=info
# Options: error, warn, info, debug
TIMEZONE=UTC
UTC=true
# ==============================================================================
# PM2 Configuration
# ==============================================================================
PM2_INSTANCES=max
PM2_EXEC_MODE=fork
# Options: fork, cluster
# ==============================================================================
# External APIs (Optional)
# ==============================================================================
# Google Cloud Storage
GOOGLE_STORAGE_BUCKET_NAME=your-bucket-name
STORAGE_BUCKET=your-bucket-name
STORAGE_BUCKET_ACCESS_KEY=your-access-key
STORAGE_BUCKET_SECRET_KEY=your-secret-key
STORAGE_BUCKET_SERVER=https://your-storage-server.com
# ==============================================================================
# Email Configuration (Optional)
# ==============================================================================
EMAIL_HOST=smtp.gmail.com
EMAIL_HOST_USER=noreply.your-email@gmail.com
EMAIL_HOST_PASSWORD=your-password
EMAIL_PORT=587
EMAIL_USE_TLS=True
# ==============================================================================
# SMS Configuration (Twilio - Optional)
# ==============================================================================
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
#SMS Gateway to send OTP
SMS_API_ENDPOINT=https://www.kwtsms.com/API/send/
SMS_SENDER_USERNAME=your-username
SMS_SENDER_PASSWORD=your-password
SMS_SENDER=your-sender
SMS_SENDER_MODE=1
# ==============================================================================
# Additional API Configuration
# ==============================================================================
API_URL_STAGING=https://your-staging-url.com
SUPPORT_EMAIL=your-email@gmail.com
SUPPORT_URL=https://your-support-url.com
AUTO_MIGRATE=false
# ==============================================================================
# Database Pool Configuration
# ==============================================================================
DB_POOL_IDLE_TIMEOUT=30000
DB_POOL_CONNECTION_TIMEOUT=10000
# ==============================================================================
# Authentication - Master OTP
# ==============================================================================
MASTER_OTP=123456
MASTER_ADMIN_OTP=654321
# ==============================================================================
# Twilio WhatsApp Configuration (Optional)
# ==============================================================================
TWILIO_WHATSAPP_NUMBER=
TWILIO_MESSAGING_SERVICE_ID=
TWILIO_CONTENT_ID=
# ==============================================================================
# Google Cloud Storage Credentials (Optional)
# ==============================================================================
# Request Queue (enable in production)
ENABLE_REQUEST_QUEUE=true
MAX_QUEUE_SIZE=100
MAX_CONCURRENT_REQUESTS=50
# Rate Limiting
RATE_LIMIT_MAX=200