What's Changed
Preserve replicas for externally scaled Swarm services
Set the cd.doco.deployment.preserve_replicas service label to true to let an external tool, such as an autoscaler, own the replica count of a Swarm service.
- Service updates keep the live replica count instead of applying
deploy.replicas. New services still start withdeploy.replicas. All other spec changes apply as usual. - The drift check skips the replica count for these services, so a scaled service does not trigger a redeployment on every poll.
- Remove the label or set it to
falseto restore Git enforcement on the next deployment. - The label applies only to
replicatedservices. It is ignored for scheduled job services, the doco-cd service, and changes betweenreplicatedandglobalmode. - Set the label under the service
labels:. The Swarm loader does not passdeploy.labelsto the container spec.
See Deploy Settings in the wiki.
Trigger polls with signals
Send SIGHUP or SIGUSR1 to doco-cd to run all enabled poll jobs from POLL_CONFIG or POLL_CONFIG_FILE once. No API key or exposed API port is needed.
- The signal does not reload configuration.
- A signal received during a run queues at most one follow-up run.
- Signal polls follow the same rules as REST and MCP polls: they respect
pauseand sync windows, and bypass retry backoff and exhausted retry budgets.
Example
docker kill --signal=HUP doco-cd
# or in the directory of the doco-cd Compose project
docker compose kill --signal=HUP appSee Poll Settings in the wiki.
Pinned Swarm helper image
Swarm helper jobs, such as image pruning, now use a digest-pinned official Docker CLI image by default. Set DOCKER_SWARM_HELPER_IMAGE to use a mirror or another image. An override without a digest is accepted with a startup warning when Swarm features are enabled.
Existing helper services adopt the configured image on the next run.
See also Swarm Mode -> Image Pruning in the wiki.
Fix: idle scheduled job services redeployed on every poll
In Swarm, replicated restart-mode scheduled job services idle at 0 replicas. The drift check compared this with the Compose scale and redeployed the whole stack on every poll. The same happened after a run left the service at its intended replica count.
The drift check now accepts 0 replicas or the run's replica count for these services. Any other count is still drift.
All changes
✨ Features
- feat(swarm): add preserve_replicas label for external scaling by @kimdre in #2240
- feat(poll): trigger configured polls on SIGHUP or SIGUSR1 by @kimdre in #2243
🌟 Improvements
🐛 Bug Fixes
📦 Dependencies
- chore(deps): update debian:trixie-slim docker digest to 8aa5a7b by @renovate[bot] in #2235
- chore(deps): update docker:29-dind docker digest to 1c90c08 by @renovate[bot] in #2236
- chore(deps): update docker/github-builder digest to bb1eb9f by @renovate[bot] in #2238
- chore(deps): update github/codeql-action digest to 915412f by @renovate[bot] in #2239
- chore(deps): update gcr.io/distroless/base-debian13 docker digest to 1eb7e76 by @renovate[bot] in #2245
- chore(deps): update docker:29-dind docker digest to fbbc96e by @renovate[bot] in #2244
- fix(deps): update aws-sdk-go-v2 monorepo by @renovate[bot] in #2247
- fix(deps): update module github.com/docker/cli to v29.10.1+incompatible by @renovate[bot] in #2248
Full Changelog: v0.137.0...v0.138.0