-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
42 lines (41 loc) · 923 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 = {
apps: [
{
script: 'app.js',
watch: true,
interpreter: './node_modules/.bin/babel-node',
env: {
NODE_ENV: 'development',
watch: false,
},
env_dev: {
name: 'thisdev',
NODE_ENV: 'production',
watch: true,
DB_NAME: 'testdatabase',
DB_HOST: 'localhost',
DB_PORT: '3306',
DB_USER: 'root',
DB_PASS: 'ghd123',
DB_DIALECT: 'mysql',
},
env_production: {
NODE_ENV: 'production',
watch: false,
},
},
],
deploy: {
production: {
user: 'SSH_USERNAME',
host: 'SSH_HOSTMACHINE',
ref: 'origin/master',
repo: 'GIT_REPOSITORY',
path: 'DESTINATION_PATH',
'pre-deploy-local': '',
'post-deploy':
'npm install && pm2 reload ecosystem.config.js --env production',
'pre-setup': '',
},
},
};