Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 71 forks source link

Can start app after using pm2 deploy #114

Closed paciellogroup closed 7 years ago

paciellogroup commented 7 years ago

Hello,

I'm trying to use the deployment module like described here: http://pm2.keymetrics.io/docs/usage/deployment/

When I use "pm2 deploy ... setup" it creates various sub folder in my "mypath" folder, and pull the project into "source".

"pm2 deploy ... update" correctly update the source files, but the post_deploy command "pm2 startOrRestart" doesn't work:

Error: Cannot find module '/mypath/app.js' which makes sense because the actual file is in '/mypath/source/app.js'.

What am I missing?

Thanks for your help.

ferllings commented 7 years ago

Any idea?

vmarchaud commented 7 years ago

The path of entry file should be relative to the ecosystem.json, in your case script: 'app.js' should do the trick.