Skip to content

feat(compose): multiple compose files and profiles - #26

Merged
djpfs merged 2 commits into
mainfrom
feat/compose-multifile-profiles
Oct 21, 2026
Merged

djpfs merged 2 commits into
mainfrom
feat/compose-multifile-profiles

Conversation

@djpfs

@djpfs djpfs commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • docker compose -f a.yml -f b.yml: all -f files are merged in order (maps key by key, command/entrypoint replaced, lists accumulate without repeats).
  • Default file discovery: COMPOSE_FILE, then compose.yaml/docker-compose.yml, plus the matching .override file.
  • --profile (repeatable) and COMPOSE_PROFILES enable profiled services.
  • DockerCommand.values(_:) exposes every value of a repeatable flag.

Test plan

  • swift test: ComposeMultiFileTests (3 tests) and the full suite pass
  • Real stack with a base and an override file (needs a running daemon)

Not in this PR: scale, configs mounts, and healthcheck/deploy behaviour (next steps for item 3).

- docker compose -f a.yml -f b.yml: every -f is kept (the parser now
  records all values of a flag) and the files are merged in order at the
  YAML tree level. Maps merge key by key, command and entrypoint are
  replaced, other lists accumulate without repeats.
- Without -f: COMPOSE_FILE (colon-separated), else compose.yaml or
  docker-compose.yml, plus the matching .override file when present.
- --profile (repeatable) and COMPOSE_PROFILES enable services that
  declare profiles; other profiled services are left out.
- Parser: DockerCommand.values(_:) returns every occurrence of a flag.
Keep both the compose file and profile helpers and the registry login helpers.
@djpfs
djpfs merged commit ad3e06b into main Oct 21, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant