Skip to content

Instantly share code, notes, and snippets.

@ufna
Created October 9, 2019 19:17
Show Gist options
  • Save ufna/6a81caabf36b1ae467c6b566ac013073 to your computer and use it in GitHub Desktop.
Save ufna/6a81caabf36b1ae467c6b566ac013073 to your computer and use it in GitHub Desktop.
Restart nodejs app with Jenkins and pm2
cd Extras/WebhookDemo
# replace secret key
jq -c '.store.secretKey = "'$MYSECRET'"' config.json > tmp.$$.json && mv tmp.$$.json config.json
cat config.json
# run node now
npm install
#pm2 delete all
#BUILD_ID=dontKillMe pm2 restart bin/www -f
BUILD_ID=dontKillMe pm2 startOrReload ecosystem.config.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment