Created
June 3, 2018 20:19
-
-
Save JamesTheHacker/e76b29a13c4d1957dec7c1fde0960a7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
apps: [ | |
{ | |
name: 'API', | |
script: 'server.js', | |
env: { | |
APP_SECRET: process.env.APP_SECRET | |
}, | |
env_production: { | |
NODE_ENV: 'production' | |
} | |
}, | |
], | |
deploy: { | |
production: { | |
key: process.env.HOST_KEY, | |
user: process.env.API_USER, | |
host: process.env.REMOTE_HOST, | |
ref: 'origin/master', | |
repo: process.env.API_REPO, | |
path: '/home/' + process.env.API_USER + '/', | |
'post-deploy': 'npm install && node_modules/pm2/bin/pm2 startOrRestart ecosystem.config.js --env production', | |
ssh_options: [ | |
'StrictHostKeyChecking=no', | |
'PasswordAuthentication=no' | |
] | |
}, | |
development: { | |
key: process.env.HOST_KEY, | |
user: process.env.API_USER, | |
host: process.env.REMOTE_HOST, | |
ref: 'origin/master', | |
path: '/home/' + process.env.API_USER + '/', | |
repo: process.env.API_REPO, | |
'post-deploy': 'npm install && node_modules/pm2/bin/pm2 startOrRestart ecosystem.config.js', | |
ssh_options: [ | |
'StrictHostKeyChecking=no', | |
'PasswordAuthentication=no' | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment