Skip to content

Commit beff43b

Browse files
committed
add ecosystem.config.js
1 parent 04a6071 commit beff43b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ecosystem.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
apps : [{
3+
name: "server",
4+
script: 'app.js',
5+
instances: "max",
6+
exec_mode: "cluster",
7+
watch: '.',
8+
script: './app.js',
9+
restart_delay: 2000,
10+
ignore_watch: ["node_modules"]
11+
env_production: {
12+
NODE_ENV: "production",
13+
HOST: 'localhost',
14+
PORT: 3000,
15+
PGHOST: 'localhost',
16+
PGUSER: 'postgres',
17+
PGDATABASE: 'baby_db',
18+
PGPASSWORD: '14774',
19+
PGPORT: 5432,
20+
PASS_SALT: '/3KrQX8U7PDVvRAkpqY'
21+
}
22+
}],
23+
deploy : {
24+
production : {
25+
user : 'SSH_USERNAME',
26+
host : 'SSH_HOSTMACHINE',
27+
ref : 'origin/master',
28+
repo : 'GIT_REPOSITORY',
29+
path : 'DESTINATION_PATH',
30+
'pre-deploy-local': '',
31+
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production',
32+
'pre-setup': ''
33+
}
34+
}
35+
};

0 commit comments

Comments
 (0)