-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
44 lines (40 loc) · 1.04 KB
/
ecosystem.config.js
File metadata and controls
44 lines (40 loc) · 1.04 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
module.exports = {
apps: [
{
name: 'address-validation-service',
script: 'dist/server.js',
exec_mode: 'fork',
max_memory_restart: '256M',
autorestart: true,
watch: false,
max_restarts: 50,
min_uptime: '10s',
restart_delay: 4000,
exp_backoff_restart_delay: 30000, // Added exponential backoff
error_file: './logs/error.log',
out_file: './logs/out.log',
log_file: './logs/combined.log',
time: true,
merge_logs: true,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
env: {
NODE_ENV: 'production',
LOG_LEVEL: 'error', // Reduce disk writes by ~90%
PORT: 3715,
},
env_development: {
NODE_ENV: 'development',
PORT: 3715,
LOG_LEVEL: 'debug',
},
kill_timeout: 5000,
listen_timeout: 3000,
cron_restart: '0 3 * * *',
wait_ready: true,
post_update: [
'npm ci --omit=dev || npm install --production --ignore-scripts',
'npm run build',
],
},
],
};