Reputation: 4143
Is it possible not to stop nodejs app when updating app source code from GIT?
Currently Jelastic stops the server before fetching files from GIT:
Stopping nodejs server:
[PM2] Applying action deleteProcessId on app [all](ids: 0,1)
[PM2] [app](0) ✓
[PM2] [app](1) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
[ OK ]
Is it possible not to stop the app? I'd like to call "pm2 reload app" instead of stopping it.
I tried searching which script does this by using grep
. Unfortunately, no files containing Stopping nodejs server:
line.
Upvotes: 3
Views: 376
Reputation: 1993
The NodeJS service is stopped before the update from GIT because it can take plenty of time to pull all the changes and install the updated dependencies - and the behavior of the application can be unpredictable during these operations. Please also note that the update from git is performed only if the last commit ID on the remote differs from the last local commit ID when the update process is triggered on Jelastic - in other words, there are no pulls and stop-starts if there are no changes on the remote.
Upvotes: 0