-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Graceful shutdown #589
Comments
@WayneUong could you please give more details? Do you want to shutdown the app, or cancel while deploying the app? |
@zodern When the app is being deployed, I want to wait till all node processes are done before the old app is shut down and replaced with the new app. |
I was wondering about the same and found out the following: The command The documentation of docker states that An article like https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers/ explains very detailed how which of the possible versions of shutting down a container work. My suggestion here is to replace the forcefully removing calls by something like the following: # Gracefully stopping the meteor application
sudo docker stop -t $TIMEOUT $APPNAME || :
# Continue with forcefully stopping and removing
sudo docker rm -f $APPNAME || :
sudo docker rm -f $APPNAME-frontend || :
sudo docker rm -f $APPNAME-nginx-letsencrypt || :
sudo docker rm -f $APPNAME-nginx-proxy || : Doing this will give us the possibility to e.g. gracefully shut down the connections to the client systems and make sure the code is finished and doesn't hick up in the middle of a function. |
To have a graceful shutdown here would also be nice to support this plugin: https://www.npmjs.com/package/@meteorjs/ddp-graceful-shutdown It would also help me gracefully shutting down my HTTP server I have on Meteor (http://dillonbuchanan.com/programming/gracefully-shutting-down-a-nodejs-http-server/) and certainly also be necessary to detecting jobs that are stopped (vsivsi/meteor-job-collection@97822bf#diff-04c6e90faac2675aa89e2176d2eec7d8R2034). |
See pull request #964 |
Is there an option for graceful shutdown during deployment?
The text was updated successfully, but these errors were encountered: