What's Changed
What's Changed
This adds a new auto_discover boolean option to the deploy config. If set to true, doco-cd will try to autodiscover projects/stacks to deploy by searching for docker-compose.y(a)ml or compose.y(a)ml files in subdirectories in the working directory (working_dir). Doco-cd will internally generate new deploy configs based on the directory name and inherits all other settings from the base deploy config inside the .doco-cd.yml file or inline deployment config in poll configs.
When a app is no longer available in the working_dir (e.g. deleted or moved to another directory outside the working dir), doco-cd will automatically remove the deployed project/stack from the docker host.
Available settings:
auto_discover: (bool) true # enables autodiscovery of services to deploy in the working directory by checking for subdirectories with docker-compose files
auto_discover_opts: # options for the autodiscovery feature
depth: (int) 0 # maximum depth of subdirectories to scan for docker-compose files, set to 0 for no limit
delete: (bool) true # auto-remove obsolete auto-discovered deployments that are no longer present in the repository For example with a structure like this
.doco-cd.yml
apps/
wordpress/
docker-compose.yml
.env
nginx/
docker-compose.yaml
configs/
nginx.conf
misc/
image.png
and a .doco-cd.yml with the following content:
working_dir: apps/
auto_discover: truedoco-cd would deploy 2 stacks to the docker host:
- wordpress
- nginx
✨ Features
🌟 Improvements
📦 Dependencies
- fix(deps): update aws-sdk-go-v2 monorepo by @renovate[bot] in #768
- fix(deps): update module golang.org/x/net to v0.47.0 by @renovate[bot] in #769
- chore(deps): pin codespell-project/actions-codespell action to 406322e by @renovate[bot] in #771
- chore(deps): update github/codeql-action digest to 014f16e by @renovate[bot] in #774
- chore(deps): update module golang.org/x/tools to v0.39.0 by @renovate[bot] in #775
📚 Miscellaneous
Full Changelog: v0.50.0-rc.1...v0.50.0-rc.2