-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem.config.js
41 lines (40 loc) · 1.01 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
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps: [
{
name: 'smthome-pwa',
script: 'node_modules/gatsby/dist/bin/gatsby.js',
args: 'serve --port 3000',
kill_timeout: 3000,
env: {
DEBUG: 'smtApp:*,error,debug',
PEER_ADDR: 'localhost',
PEER_PORT: '8765',
},
env_production: {
NODE_ENV: 'production',
DEBUG: 'smtApp:*,error',
PEER_ADDR: '192.168.1.28',
PEER_PORT: '8765',
},
},
],
/**
* Deployment section
* http://pm2.keymetrics.io/docs/usage/deployment/
*/
deploy: {
production: {
user: 'cjk',
host: '192.168.1.28',
ref: 'origin/master',
repo: '[email protected]:cjk/smart-home-pwa.git',
path: '/home/cjk/apps/smarthome-pwa',
'pre-deploy-local': 'rm -f *.tmp',
'post-deploy': 'yarn install && yarn run build && pm2 reload ecosystem.config.js --env production',
},
},
}