/pm2_cicd

Primary LanguageJavaScript

PM2 CI/CD Process

Instructions

  1. Install PM2 npm install pm2 -g
  2. Add ssh configurations to Github account
  3. Clone the latest version repository (using ssh option git clone ssh-path)
  4. Run in project's root path pm2 deploy ecosystem.config.js production setup - Create the environment pre-deploy
  5. Run in project's root path pm2 deploy ecosystem.config.js production - Deploy a new version
  6. If you want to validate that process is running well, you should run pm2 ls and if you need to see the logs registry pm2 log 0 (0 or pm2's process number)

Notes:

  • setup option isn't necessary run in each deployment, is enough running production or the environment name that you have configured.

References