Fix Docker Swarm rolling update deadlock

Summary

  • Switch from host-mode to ingress-mode port publishing for Swarm services
  • Remove force-update step from deploy script

Problem

The previous configuration used mode: host for port publishing combined with order: start-first update strategy. This creates a deadlock:

  1. start-first requires the new container to start before stopping the old
  2. mode: host binds ports directly to host, only allowing one container per port
  3. New container cannot start because port is occupied by old container
  4. Old container won't stop until new one is running

Solution

Use ingress mode (the default) which routes traffic through Swarm's routing mesh. This allows multiple containers to coexist during updates, enabling proper zero-downtime rolling deployments.

Test plan

  • Deploy using deploy-swarm.sh with a new version
  • Verify services update without downtime
  • Check services are accessible during update

Merge request reports

Loading