What's Changed
This update improves deployment safety, concurrency, and performance, especially for repositories with multiple auto-discovered stacks.
Git repositories and OCI sources are now prepared as immutable, content-addressed artifacts. Deployments use a dedicated artifact for each revision instead of a shared mutable working tree. This allows independent stacks to deploy concurrently, while deployments for the same stack remain serialized. Older webhook events are also prevented from overwriting newer deployments.
Source preparation and Git checks are more efficient:
- Repository artifacts are reused when the repository, reference, and compatible
git_depthmatch. - Git change detection and ancestry checks are cached across stacks that use the same revisions.
- Changed files are detected using Git tree comparisons instead of generating full patches.
- Compose discovery, SOPS decryption, and reload handling are performed atomically.
- Legacy repository layouts are migrated automatically during startup.
Read-only pre-deployment work, such as source initialization and change detection, is now handled separately from Docker-mutating deployment work. This allows more preparation tasks to run concurrently without consuming deployment slots.
You can find more information in the artifact storage documentation.
New configuration options
| Variable | Default | Purpose |
|---|---|---|
MAX_CONCURRENT_PREDEPLOYMENTS
| 8
| Maximum number of concurrent read-only pre-deployment operations, including initialization and change detection. |
ARTIFACT_GC_ENABLED
| true
| Enables cleanup of unreferenced Git revision and OCI digest artifacts. |
ARTIFACT_GC_RETENTION_RECORDS
| 2
| Number of recent unreferenced artifacts to keep per repository or artifact. |
ARTIFACT_GC_RETENTION_TTL
| 1m
| Minimum time older unreferenced artifacts are retained before removal. |
ARTIFACT_GC_INTERVAL
| 10m
| How often artifact cleanup runs. A sweep also runs at startup. |
MAX_CONCURRENT_DEPLOYMENTS continues to control the number of deployments that may perform Docker mutations. MAX_CONCURRENT_PREDEPLOYMENTS controls preparation separately and can be adjusted according to available CPU, network, and storage capacity.
Updating considerations
- Existing legacy repository data is migrated automatically during startup, no action is required. Allow this migration to finish before triggering new deployments.
- Do not run multiple doco-cd versions against the same data directory during migration.
- Artifact garbage collection may remove unreferenced source artifacts and decrypted SOPS material once the retention rules allow it. Increase the retention settings or disable
ARTIFACT_GC_ENABLEDif older artifacts must remain available. - In-flight deployments and artifacts still referenced by running stacks are protected from cleanup, but unreferenced artifacts should not be assumed to remain indefinitely.
Caution
Services that write inside the cloned repository with relative bind mounts (inside the doco-cd data directory/volume) will lose their data when the service is re-/deployed from a new artifact revision.
Each artifact revision/version is like a clean, new Git worktree: When doco-cd deploys from a new Git commit or OCI artifact version, it first creates a new artifacts/<revision> worktree directory to deploy from.
If you use Pre- / Post-Deployment Scripts to generate configuration or data, it might be recommended to use named volumes or absolute host paths depending on your use case.
✨ Features
🌟 Improvements
📦 Dependencies
- chore(deps): update docker:29-dind docker digest to 3f3c01a by @renovate[bot] in #1877
- chore(deps): update codecov/codecov-action action to v7.1.1 by @renovate[bot] in #1878
- chore(deps): update github/codeql-action digest to 1c5b675 by @renovate[bot] in #1882
- chore(deps): update debian:trixie-slim docker digest to e27e3db by @renovate[bot] in #1884
- fix(deps): update module github.com/modelcontextprotocol/go-sdk to v1.8.0 by @renovate[bot] in #1885
- fix(deps): update module github.com/aws/aws-sdk-go-v2/service/secretsmanager to v1.50.0 by @renovate[bot] in #1883
- chore(deps): update debian:trixie-slim docker digest to a99cfc5 by @renovate[bot] in #1888
- chore(deps): update golang:1.27.1 docker digest to 3680233 by @renovate[bot] in #1889
📚 Miscellaneous
Full Changelog: v0.119.0...v0.120.0