pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

Perform an action before deployement (pre-deploy)

Open darkterra opened this issue 9 years ago • 3 comments

I every one, Thank you for this amazing tool, I love PM2 !

But :

What's going wrong?

It is not possible to perform an action on the remote server before deployment (Ex: Backup of a BDD)

darkterra avatar Sep 06 '17 00:09 darkterra

There is a hook to do this : pre-deploy: 'your command'

vmarchaud avatar Sep 06 '17 08:09 vmarchaud

Thank @vmarchaud !

Maybe the documentation, should be updated?

http://pm2.keymetrics.io/docs/usage/deployment/

Because on the documentation there is only 'pre-deploy-local' Unless I missed something?

darkterra avatar Sep 06 '17 09:09 darkterra

Yes it should, feel free to make a PR to include it : https://github.com/pm2-hive/pm2-hive.github.io/blob/master/docs/features/deployment.md You can find every available hook inside the deploy script here

vmarchaud avatar Sep 06 '17 09:09 vmarchaud