Deploy system for PM2
This is the module that allows to do pm2 deploy
.
Documentation: http://pm2.keymetrics.io/docs/usage/deployment/
Instalation
$ npm install pm2-deploy
Programmatic Usage
var deployForEnv = deployForEnv; // Define deploy configuration with target environmentsvar deployConfig = prod: user: 'node' host: '212.83.163.168' ref: 'origin/master' repo: 'git@github.com:Unitech/eip-vitrine.git' path: '/var/www/test-deploy' dev: user: 'node' host: '212.83.163.168' ref: 'origin/master' repo: 'git@github.com:Unitech/eip-vitrine.git' path: '/var/www/test-dev' ; // Invoke deployment for `dev` environment; // Rollback `prod` environment;
API
Table of Contents
deployForEnv
Deploy to a single environment
Parameters
deployConfig
object object containing deploy configs for all environmentsenv
string the name of the environment to deploy toargs
array custom deploy command-line argumentscb
DeployCallback done callback
Returns boolean return value is always false
DeployCallback
Type: Function