Interview Prep/Docker/Architecture & Design Decisions

How do you do blue/green or canary deployments with plain Docker?

AdvancedProductionArchitecture & Design Decisions
Answer

Run app-blue and app-green as separate Compose projects on the same proxy network. Deploy to the idle color, health check it, then flip the proxy's upstream (Traefik label/weight or nginx upstream reload). For canary, weight 5% to the new color and watch error rates before shifting fully. Rollback is flipping back, since the old containers still run.

All Docker questions Roadmap: Docker & containers

More on Architecture & Design Decisions