Interview Prep/Docker/CI/CD and production rollouts

Zero-downtime deploy on a single Docker host.

AdvancedScenarioCI/CD and production rollouts
Answer

Situation read → No orchestrator available.

What I'd do → Blue/green with a reverse proxy: start the new version as api-green, wait for healthy, switch the proxy upstream (Traefik label or nginx include + nginx -s reload), drain and stop api-blue. Tools such as docker rollout plugin or Compose + Traefik automate this.

Why → Proxy switch is atomic; old containers finish in-flight requests.

Interview tip → Also mention DB migrations must be backward compatible.

All Docker questions Roadmap: Docker & containers

More on CI/CD and production rollouts