D
Dokploy6mo ago
max.d

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
Siumauricio
Siumauricio6mo ago
Are you using docker compose?
max.d
max.dOP6mo ago
Nope using the "Application" mode with a dockerfile
johannes0910
johannes09106mo ago
add a health check in the Dockerfile, that will solve your issues
Siumauricio
Siumauricio6mo ago
This is my setup for zero downtime and rollback in case of errors
No description
Siumauricio
Siumauricio6mo ago
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...
max.d
max.dOP6mo ago
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
Siumauricio
Siumauricio6mo ago
yeah the thing is I prefer to have as we have now, because you can do anything
max.d
max.dOP6mo ago
yeah i mean as an option to prefill like traefik confs are, 0 downtime out of the box is pretty cool

Did you find this page helpful?