forked from PowerLoom/node-issue-report-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pm2.config.js
42 lines (37 loc) · 928 Bytes
/
pm2.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
// this means if app restart {MAX_RESTART} times in 1 min then it stops
const { readFileSync } = require('fs');
const NODE_ENV = process.env.NODE_ENV || 'development';
const MAX_RESTART = 10;
const MIN_UPTIME = 60000;
module.exports = {
apps : [
{
name : "epoch-generator",
script : `poetry run python -m epoch_generator`,
max_restarts: MAX_RESTART,
min_uptime: MIN_UPTIME,
env: {
NODE_ENV: NODE_ENV,
}
},
{
name : "force-consensus",
script : `poetry run python -m force_consensus`,
max_restarts: MAX_RESTART,
min_uptime: MIN_UPTIME,
env: {
NODE_ENV: NODE_ENV,
}
},
{
name : "stats-api",
script: `poetry run python -m gunicorn_main_launcher`,
max_restarts: MAX_RESTART,
min_uptime: MIN_UPTIME,
kill_timeout : 3000,
env: {
NODE_ENV: NODE_ENV,
},
}
]
}