-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
38 lines (37 loc) · 948 Bytes
/
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
module.exports = {
apps : [{
name : 'API',
script : './src/server/index.js',
env: {
NODE_ENV: 'development'
},
env_production : {
NODE_ENV: 'production'
},
output: '~/.pm2/logs/out.log',
error: '~/.pm2/logs/error.err',
log_date_format: 'YYYY-MM-DD HH:mm Z',
autorestart: true,
restart_delay: 3,
max_restarts: 5,
instances: 2,
exec_mode: 'cluster',
watch: ['src', 'index.js']
}],
deploy : {
production : {
user : 'node',
host : '212.83.163.1',
ref : 'origin/master',
repo : '[email protected]:repo.git',
path : '/var/www/production',
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'
},
development: {
user: 'node',
host: 'localhost',
path : '/var/www/development',
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env development'
}
}
};