Last active
September 29, 2018 19:19
-
-
Save DanishSiddiq/038030f7fb953589f3d3c5a8dd227698 to your computer and use it in GitHub Desktop.
Configuration file for setting up PM2
This file contains hidden or 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 : 'Custering', | |
script : 'Clustering/src/app.babel-register.js', | |
exec_mode : 'cluster_mode', | |
instances : 'max' | |
}, | |
{ | |
name : 'Clustering_Replcia', | |
script : 'ClusteringReplica/src/app.babel-register.js', | |
exec_mode : 'cluster_mode', | |
instances : '2' | |
} | |
], | |
deploy : { | |
production : { | |
user : 'node', | |
host : '202.5.1.1', | |
ref : 'origin/master', | |
repo : '[email protected]:DanishSiddiq/Clustering.git', | |
path : '/var/www/production', | |
'pre-deploy-local' : 'echo \'This is a local executed command\'', | |
// Commands to be executed on the server after the repo has been cloned | |
'post-deploy' : 'npm install && pm2 startOrRestart ecosystem.json --env production', | |
}, | |
staging : { | |
'user' : 'node', | |
'host' : '212.83.163.1', | |
'ref' : 'origin/master', | |
'repo' : '[email protected]:repo.git', | |
'path' : '/var/www/development', | |
'ssh_options': ["StrictHostKeyChecking=no", "PasswordAuthentication=no"], | |
'post-deploy' : 'pm2 startOrRestart ecosystem.json --env dev', | |
'env' : { | |
'NODE_ENV': 'staging' | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment