-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
36 lines (33 loc) · 900 Bytes
/
Copy pathecosystem.config.js
File metadata and controls
36 lines (33 loc) · 900 Bytes
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
module.exports = {
apps: [
{
name: 'nexjob-frontend',
script: 'npm',
args: 'start',
cwd: '/var/www/nexjob-frontend',
instances: 'max',
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
PORT: process.env.PORT,
},
env_production: {
NODE_ENV: 'production',
PORT: process.env.PORT,
},
// Restart settings
max_restarts: 10,
restart_delay: 4000,
// Memory and CPU settings
max_memory_restart: '10G',
// Logging
log_file: '/var/log/pm2/nexjob-frontend.log',
out_file: '/var/log/pm2/nexjob-frontend-out.log',
error_file: '/var/log/pm2/nexjob-frontend-error.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
// Health monitoring
health_check_grace_period: 3000,
health_check_fatal_exceptions: true,
}
]
};