Created
July 26, 2017 09:25
-
-
Save ygamretuta/b89066b1de3f284676ffac6284001675 to your computer and use it in GitHub Desktop.
PM2 create-react-app config
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 = { | |
/** | |
* Application configuration section | |
* http://pm2.keymetrics.io/docs/usage/application-declaration/ | |
*/ | |
apps : [ | |
{ | |
name : 'my_react_app', | |
script : 'npm', | |
args : 'run start:production', | |
env_production : { | |
NODE_ENV: 'production' | |
} | |
}, | |
], | |
/** | |
* Deployment section | |
* http://pm2.keymetrics.io/docs/usage/deployment/ | |
*/ | |
deploy : { | |
production : {}, | |
staging: { | |
user: 'your-user', | |
host: 'your-server', | |
ref: 'origin/master', | |
repo: 'git@github.com:gituser/yourrepo.git', | |
path: '/var/www/yourprojectpath', | |
key: '/absolute/path/to/key', | |
ssh_options: ['ForwardAgent=yes'], | |
'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production' | |
}, | |
dev : {} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment