-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem.config.js
42 lines (41 loc) · 1003 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
39
40
41
42
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps: [
{
name: 'smthome-fermenter',
script: './app/index.js',
kill_timeout: 5000,
wait_ready: true,
env: {
PORT: 8000,
PEER_ADDR: 'localhost',
PEER_PORT: 8765,
DEBUG: 'smt:*,error,debug',
},
env_production: {
PORT: 8000,
NODE_ENV: 'production',
PEER_ADDR: '192.168.1.28',
PEER_PORT: 8765,
DEBUG: 'smt:*,error',
},
},
],
/**
* Deployment section
* http://pm2.keymetrics.io/docs/usage/deployment/
*/
deploy: {
production: {
user: 'cjk',
host: 'alarmpi',
ref: 'origin/master',
repo: '[email protected]:cjk/smart-fermenter.git',
path: '/home/cjk/apps/smarthome-fermenter',
'post-deploy': 'yarn install && yarn run build && pm2 reload ecosystem.config.js --env production',
},
},
}