GitOps blue/green deployments for Docker Compose
duod (two slots, one daemon) is a small, open-source Go operator that brings the
Argo CD and
Argo Rollouts blueGreen workflow to a plain Docker host.
You do not need Kubernetes.
- Git is the source of truth for every service.
- Docker Compose runs the two colors, blue and green, of every service.
- Traefik in Docker switches the traffic in one atomic file write. Apache on the host works as an alternative.
Why duod #
Zero-downtime releases #
The new version starts in the idle slot and is health-checked through Traefik, on the same network path real traffic uses. Only then does traffic switch.
Independent services #
Each service has its own Git folder, state machine and Traefik file. A failing api release never blocks or rolls back shop.
Parallel rollouts #
One push can roll out several services at once. maxConcurrentRollouts caps the load.
Safe by default #
Failed health checks never reach users. A bad release stays in preview, and duod rollback returns to the previous slot without a Git change.
Monorepo-aware #
A service redeploys only when a commit touches its own source.path.
One small binary #
A static Go binary with a CLI, REST API, webhooks and Prometheus metrics. deb, rpm and tarball packages for amd64 and arm64.
The architecture in one picture #
┌──────────────────────── Docker host ────────────────────────────┐
GitOps repo webhook / │ ┌─► compose shop-blue ─┐ │
apps/shop/ ───► poll ──► duod ───────┼─► compose shop-green ─┤ network duod-edge │
apps/api/ │ │ ├─► compose api-blue ─┼──────────────┐ │
apps/admin/ │ │ └─► compose api-green ─┘ │ │
│ │ ▼ │
│ └─ writes /etc/duod/traefik/<app>.yaml ──► Traefik :443 ◄── clients
│ probes Traefik :8099 (private) ◄────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Where to start #
- Run the demo to see a rollout, a rejected broken release and a rollback.
- Install duod on a Docker host with Traefik.
- Write your service's compose file and configure the app.
- Add a webhook so every push deploys.
Verified under load #
duod was tested end to end against a real Traefik (3.5 and 3.6). Two services rolled out concurrently under continuous load
(about 7,400 requests each, 0 errors). A broken api release was rejected while shop shipped at the same time,
with 0 failed requests on either host.