-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathecosystem.config.js
45 lines (42 loc) · 1.08 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
module.exports = {
apps: [
{
name: 'dashboard-api-v1',
script: './dist/server.js',
// args: ['start'],
// watch: './src/**/*.js',
// instances: 2,
// exec_mode: 'cluster',
env: {
PORT: 3081,
},
env_production: {
PORT: 3000,
},
},
],
deploy: {
production: {
user: 'SSH_USERNAME',
host: 'SSH_HOSTMACHINE',
ref: 'origin/master',
repo: '[email protected]:cpg_cicd/dashboard-api-v1.git',
path: 'DESTINATION_PATH',
'pre-deploy-local': '',
'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
'pre-setup': '',
},
staging: {
user: 'joseph_olaoye',
host: '34.105.205.190',
ref: 'origin/master',
repo: '[email protected]:cpg_cicd/dashboard-api-v1.git',
path: '/home/joseph_olaoye/dashboard-api-v1',
'post-deploy': 'npm install && npm run build && pm2 reload ecosystem.config.js --env dev',
env: {
NODE_ENV: 'development',
NODE_CONFIG_DIR: './src/configs',
},
},
},
};