Switch deploy script from Swarm to Docker Compose
Summary
- Switch from Docker Swarm to Docker Compose for deployment
- Add
--waitflag to ensure health checks pass before returning - Rename
deploy-swarm.shtodeploy.sh(reflects actual implementation) - Add
--pullflag to force registry pulls (default: prefer local images)
Why not Swarm?
Docker Swarm has a known long-standing bug with network allocation causing tasks to get stuck in "Preparing" state. This affected our icek deployment consistently.
Docker Compose works reliably for single-node deployments and provides:
- Health check verification via
--wait - Local image preference (faster deploys with local builds)
- ~1-2s downtime during updates (acceptable for staging)
Changes
| File | Change |
|---|---|
scripts/deploy.sh |
Renamed from deploy-swarm.sh, uses docker compose |
Test plan
-
Deployed on icek with
deploy.sh f6a2a2dd - Both containers healthy
- Health checks verified (unhealthy when app frozen, recovers when resumed)
- Measured downtime: ~1-2 seconds during update