Skip to content

Commit

Permalink
add ecosystem.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mk1020 committed Nov 11, 2021
1 parent 04a6071 commit beff43b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
apps : [{
name: "server",
script: 'app.js',
instances: "max",
exec_mode: "cluster",
watch: '.',
script: './app.js',
restart_delay: 2000,
ignore_watch: ["node_modules"]
env_production: {
NODE_ENV: "production",
HOST: 'localhost',
PORT: 3000,
PGHOST: 'localhost',
PGUSER: 'postgres',
PGDATABASE: 'baby_db',
PGPASSWORD: '14774',
PGPORT: 5432,
PASS_SALT: '/3KrQX8U7PDVvRAkpqY'
}
}],
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': ''
}
}
};

0 comments on commit beff43b

Please sign in to comment.