Zero downtime possible
Hey folks,
I am running a web service with 4 concurrent containers, after deploy I get about 5-10s downtime when old containers go down, new containers go up and the app starts. Is there a way to have old containers dropped with a delay or only after new container begins listening on a port? (i.e. 0 downtime setup)
8 Replies
Are you using docker compose?
Nope using the "Application" mode with a dockerfile
add a health check in the Dockerfile, that will solve your issues
This is my setup for zero downtime and rollback in case of errors

you can see a basic example here https://github.com/Dokploy/dokploy/discussions/492#discussioncomment-10850839
GitHub
What is the best practice for zero downtime deployment of a Docker ...
In the past, I used nginx + docker compose for deployment, and there would be a few seconds of service unavailability with each deployment. I'd like to ask what is the best practice for zero do...
ah perfect this is what i was missing, thank you!
awesome, can confirm that it works. I think it's pretty safe to automate simply asking for a port for auto health check
yeah the thing is I prefer to have as we have now, because you can do anything
yeah i mean as an option to prefill like traefik confs are, 0 downtime out of the box is pretty cool