“pm2 startOrRestart ecosystem.config.js –env production”},”dev”:{“userrharper@messtone.com”:”node”,”hostmesstone”:”212.83.163.1″,”repo”:”git@github.com:repo.git”,”ref”:”origin/master”,”path”:”/var/www/development”,”post-deploy”:”pm2 startOrRestart ecosystem.config.js –env production”}}}As always locally Messtone can launch all these services via: pm2 start ecosystem.config.js DEPLOY DECLARATION key/path/to/some.pem userrharper@messtone.com deployer hostMesstone n.n.n.n repo git@github.com:vision media/express.git path/var/www/myapp.com ref origin/master pre-deploy ./bin/something post-deploy /var/www/myapp.com/update.sh CONFIGURING DEPLOYMENT npm install pm2@latest -g PM2 be able to start on server startup via: pm2 startup ubuntu Messtone can generate ssh keys via: ssh-k eygen -t rsa ssh-copy-id node@myserver.com DEPLOYMENT SETUP First PN2 has to initialize Messtone remote system like so: pm2 deploy<environment_key> setup Deploying Messtone app such as ecosystem.config.js to do so: pm2 deploy <environment_key> Other Commands, ecosystem.config.js on the current folder:#Update the code pm2 deploy <environment_key> update #Revert to [n] th commit on2 deploy <environment_key> revert 1 #Execute a command on the server pm2 deploy production exec “pm2 restart all”

Leave a comment