How do you deploy updates with zero downtime on a single Docker host?
AdvancedProductionResource Limits, Health & Reliability
Answer
Run behind a reverse proxy (Traefik/nginx/Caddy) with two replicas: start the new version alongside, wait for health, shift traffic, then drain and stop the old one. Tools: docker rollout plugin for Compose, blue/green with two Compose projects and a proxy upstream swap, or Docker Swarm update_config. Apps need graceful shutdown and backward-compatible schema.
More on Resource Limits, Health & Reliability
How do you set memory and CPU limits, and what happens when they are exceeded?BeginnerWhat is the difference between `--cpus`, `--cpu-shares` and `--cpuset-cpus`?BeginnerWhat does `--memory-reservation` do?AdvancedHow do you diagnose an OOM-killed container?IntermediateWhy do JVM and Node services in containers need explicit memory flags?IntermediateWhat is CPU throttling, and how do you detect it?Advanced