How kimdre/doco-cd works
Doco-CD is a GitOps continuous-delivery service for Docker Compose projects and Swarm stacks. Its primary workflow begins with a poll or provider webhook, prepares a Git or OCI source, then reconciles and deploys the resulting configuration to Docker. The repository also exposes REST and MCP automation, scheduled jobs, sync windows, secret handling, notifications, metrics, and self-update support. Relationships beyond the excerpted calls are limited to capabilities and connections explicitly documented in the README; unsampled implementation details are not asserted.
Main entry points: controlplane Run control · docker Docker deployment · handler_webhook.go Webhooks · source Source preparation
Components 21
Triggers and APIs
- Polling
cmd/doco-cd/handler_poll.go - Webhooks
cmd/doco-cd/handler_webhook.go - REST API
internal/api - MCP server
internal/mcp
Delivery workflow
- Run control
internal/controlplane - Source preparation
internal/source - Git operations
internal/git - OCI artifacts
internal/source/oci/service.go - Deploy configuration
internal/config/deploy/deploy.go - Deployment stages
internal/stages - Reconciliation
internal/reconciliation/manager.go
Docker runtime
- Docker deployment
internal/docker - Swarm stacks
internal/docker/swarm/service.go
Operations and integrations
- Job scheduling
internal/scheduler - Sync windows
internal/syncwindow/syncwindow.go - Secrets and encryption
internal/encryption - Notifications
internal/notification/notification.go - Prometheus metrics
internal/prometheus - Self update
internal/selfupdate/journal.go
Other components
- Git provider
- Docker host
Connections 23
- Git provider → Webhooks: sends events
README.md - Polling → Run control: starts poll run
cmd/doco-cd/handler_poll.go - Webhooks → Run control: executes run
cmd/doco-cd/handler_webhook.go - Polling → Run control: triggers deployment
README.md - Webhooks → Run control: triggers deployment
README.md - Run control → Source preparation: prepares source
- Source preparation → Git operations: fetches repository
internal/source/prepare.go - Source preparation → OCI artifacts: resolves artifact
internal/source/prepare.go - Source preparation → Deploy configuration: loads configuration
internal/config/deploy/deploy.go - Run control → Deployment stages: runs stages
- Deployment stages → Reconciliation: requests deployment
internal/reconciliation/manager.go - Reconciliation → Docker deployment: reconciles services
internal/reconciliation/manager.go - Docker deployment → Docker host: deploys projects
README.md - Docker deployment → Swarm stacks: supports stacks
README.md - REST API → Run control: manages runs
internal/api/handler.go - MCP server → Run control: automates runs
internal/mcp/handler.go - Job scheduling → Docker deployment: runs scheduled jobs
internal/scheduler/scheduler_manager.go - Run control → Sync windows: honors windows
- Deployment stages → Secrets and encryption: resolves secrets
internal/stages/stage_2_pre-deploy.go - Webhooks → Notifications: sends failure notice
cmd/doco-cd/handler_webhook.go - Job scheduling → Notifications: notifies failures
- Docker deployment → Prometheus metrics: reports metrics
internal/prometheus/collectors.go - Deployment stages → Self update: checks update state
internal/stages/stage_2_pre-deploy.go