#!/usr/bin/env bash
# deploy-canary.sh — zero-downtime canary deployment for Docker services.
#
# Starts the new version alongside the old one, runs health checks,
# then cuts traffic over. If health checks fail, the new container
# is removed and the old one keeps serving. No load balancer required —
# uses Docker's port mapping to swap atomically.
#
# Usage: ./deploy-canary.sh myapp:v2.1
set -euo pipefail
deploy-canary.sh