Sandro Turriate

Coder, cook, explorer

Zero downtime deployments with Docker, Caddy Server, and Bash

Jan 5, 2021


  1. Pull your new docker image.
  2. Docker run “your-app-new” on a new port.
  3. Load balance your reverse proxy to 2 servers simultaneously: “your-app” and “your-app-new”.
  4. Send a graceful shutdown signal to “your-app”.
  5. Spin up the new docker image as “your-app”.
  6. Load your original Caddy config to only load balance to “your-app”.
  7. Shut down “your-app-new”.