You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently switching our deployment process to pm2 and so far it seems simple and straight forward. Especially the zero downtime reload is awesome. However, I've come to one issue:
Our very simple deployment config looks like this:
Upon deployment, we simply execute pm2 reload ecosystem.config.js, and everything is fine. But as we're an agile team, our apps will eventually change and this leads to the following issues:
Path of a script is changed: Assume, the script for the web part is no longer in ./bin/web, but moved to server/app.js. We modify the ecosystem.config.js accordingly, execute pm2 reload ecosystem.config.js, but pm2 still runs the former entry, i.e. the change to the script is not reflected.
Motivated by above's issue, we tried to rename web to web-new. Upon invoking pm2 reload ecosystem.config.js, web-new is added, but obviously web is still in pm2's list, although it's been deleted from the configuration.
Both issues could be avoided by doing pm2 delete all && pm2 reload ecosystem.config.js obviously, where we would first delete all entries and then re-add them. But naturally, we would lose the zero downtime functionality (which, ironically, made me switch to pm2 in the first place).
Is there a different solution which I might have overlooked? Something which would simply sync currently running processes with the entries from the deployment configuration?
The text was updated successfully, but these errors were encountered:
I'm currently switching our deployment process to pm2 and so far it seems simple and straight forward. Especially the zero downtime reload is awesome. However, I've come to one issue:
Our very simple deployment config looks like this:
Upon deployment, we simply execute
pm2 reload ecosystem.config.js
, and everything is fine. But as we're an agile team, our apps will eventually change and this leads to the following issues:Path of a
script
is changed: Assume, the script for theweb
part is no longer in./bin/web
, but moved toserver/app.js
. We modify theecosystem.config.js
accordingly, executepm2 reload ecosystem.config.js
, but pm2 still runs the former entry, i.e. the change to thescript
is not reflected.Motivated by above's issue, we tried to rename
web
toweb-new
. Upon invokingpm2 reload ecosystem.config.js
,web-new
is added, but obviouslyweb
is still in pm2's list, although it's been deleted from the configuration.Both issues could be avoided by doing
pm2 delete all && pm2 reload ecosystem.config.js
obviously, where we would first delete all entries and then re-add them. But naturally, we would lose the zero downtime functionality (which, ironically, made me switch to pm2 in the first place).Is there a different solution which I might have overlooked? Something which would simply sync currently running processes with the entries from the deployment configuration?
The text was updated successfully, but these errors were encountered: