Skip to main content
Martin Hähnel

Zero Downtime Deploys, At Last

Changelog

  • 2025-11-27 - Added SelfHosting tag

A cropped screenshot from the app Uptime Kuma showing two rows. One row has the text "Blog (docker compose)" on the left, with a bunch of green pill shaped symbols with four reds in the middle, denoting some downtime. The second row has the text "Blog (single image)" with only green symbols.

This is just a short note to document how my current blog is deployed with zero downtime. When I moved my blog from Cloudflare to my own server and Coolify I was somewhat dismayed to learn that Coolify can't do zero downtime (rolling release, blue/green) deployments using docker-compose files. Which is a pity because that is a great little format to configure a set of services and their relationship to each other.

My website had about 65 seconds of downtime just now, because coolify can’t do zero downtime deployments with a docker compose project. My blog consists of a db, a kv store, a node app and a server (for reverse proxying). I do not want to configure all of these services separately in this janky-er than the jankiest jank self hosted paas. I only have myself to blame as I didn’t recognize the downtime problem when moving the blog (and thought that I can live with the jank otherwise). Now I basically have to move again in some form or fashion.

(me on mastodon)

Well, I didn't leave coolify[1], but I have given in - as it seems the main problem is that docker doesn't expose docker-compose on its API, making it hard for tooling to make use of compose files and have now stopped using docker-compose files.

I now have the following setup:

(With "external" I mean external to the Dockerfile.)

Since I only have one image instead of a bunch of services, I can now use the Dockerfile strategy instead of the docker-compose one, giving me free zero downtime deploys (coolify docs).


  1. which is still pretty janky... I still respect the heck out of it! The sheer amount of features it has is impressive. It's just that its complexity shows in the amount of care some fundamental things get. Like saving the configuration of a resource doesn't always work. Really? That's what I mean. ↩︎