Closed paciellogroup closed 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.
Any idea?
The path of entry file should be relative to the ecosystem.json, in your case script: 'app.js' should do the trick.
script: 'app.js'
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.