-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
55 lines (55 loc) · 1.13 KB
/
ecosystem.config.js
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
const numCpus = require('os').cpus().length;
module.exports = {
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
apps : [{
name: 'build-worker',
script: 'worker.js',
instances: Math.floor(numCpus/2),
autorestart: true,
watch: false,
max_memory_restart: '1G',
log_date_format: 'YYYY-MM-DD HH:mm:ss.SSS',
env: {
NODE_ENV: 'development'
},
env_development: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}, {
name: 'chan',
script: 'server.js',
instances: Math.floor(numCpus/2),
autorestart: true,
watch: false,
max_memory_restart: '1G',
log_date_format: 'YYYY-MM-DD HH:mm:ss.SSS',
wait_ready: true,
kill_timeout: 5000,
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}, {
name: 'schedules',
script: 'schedules/index.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
log_date_format: 'YYYY-MM-DD HH:mm:ss.SSS',
env: {
NODE_ENV: 'development'
},
env_development: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}]
};