-
Notifications
You must be signed in to change notification settings - Fork 11
/
ecosystem.config.js
63 lines (60 loc) · 1.54 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
56
57
58
59
60
61
62
63
const dotenv = require('dotenv')
dotenv.config()
const name = 'indexer_' + process.env.NODE_ENV
const nameCron = 'cron_' + process.env.NODE_ENV
module.exports = {
apps: [
{
name: name,
script: 'yarn',
args: 'start',
// interpreter: '/bin/bash -c',
time: true,
exec_mode : "fork",
autorestart: true,
// max_restarts: 50,
watch: false,
max_memory_restart: '4G',
// instances: "max",
},
{
name: nameCron,
script: 'yarn',
args: 'cron',
// interpreter: '/bin/bash -c',
time: true,
exec_mode : "fork",
autorestart: true,
// max_restarts: 50,
watch: false,
max_memory_restart: '4G',
// instances: "max",
},
],
deploy: {
production: {
user: 'root',
host: ['18.143.123.214'],
key: 'deploy.key',
ref: 'origin/main',
exec_mode: "fork",
repo: 'git@github.com:abcxyzmn/indexer.git',
path: '/data/www/brc-indexer',
'post-setup': 'ls -la && pwd',
'post-deploy':
'yarn && pm2 reload ecosystem.config.js --env production --update-env && pm2 save',
// postinstall: "$(yarn bin)/pm2 install typecsript"
},
develop: {
user: 'root',
host: '18.143.123.214',
key: 'deploy.key',
ref: 'origin/develop',
repo: 'git@github.com:abcxyzmn/indexer.git',
path: '/data/www/hmnd',
'post-setup': 'ls -la && pwd',
'post-deploy':
'yarn && pm2 reload ecosystem.config.js --env develop --update-env&& pm2 save',
}
},
}