feat: add Docker Swarm support (MODE=swarm) #4
Reference in New Issue
Block a user
Delete Branch "worktree-docker-swarm-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
MODEenv var (composedefault, orswarm) selecting once per deployment between the existing Docker Compose subprocess flow and a new Docker-API-based Swarm service update flow.SwarmDiscovery/SwarmExecutorsatisfy the existingapi.Finder/updater.Executorinterfaces, so the HTTP layer and FIFO queue needed no changes — onlycmd/server/main.gobranches oncfg.Mode.Spec.Labels), replacing theSTACKS_ROOTpath-check that only makes sense for Compose (Swarm services have no local compose file to check a path against).tagfield was never plumbed through, so swarm mode would have deployed an untagged (:latest) image regardless of what was actually pushed.Process
Implemented via subagent-driven development from
docs/superpowers/plans/2026-07-04-docker-swarm-support.md: 7 tasks, each with an independent implementer + task-level spec/quality review (all approved clean), followed by a final whole-branch review that caught the tag-plumbing gap (fixed and re-reviewed clean).Test plan
go build ./...go test ./...(all packages green)MODE=swarmwiring is verified via build + unit tests only)