github kimdre/doco-cd v0.138.0

one hour ago

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 with deploy.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 false to restore Git enforcement on the next deployment.
  • The label applies only to replicated services. It is ignored for scheduled job services, the doco-cd service, and changes between replicated and global mode.
  • Set the label under the service labels:. The Swarm loader does not pass deploy.labels to 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 pause and 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 app

See 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

  • fix(swarm): pin the helper job image by digest by @kimdre in #2249

🐛 Bug Fixes

  • fix(swarm): stop redeploying idle scheduled job services on every poll by @kimdre in #2241

📦 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

Don't miss a new doco-cd release

NewReleases is sending notifications on new releases.