Skip to content

feat(run): accept repeatable --compose-file to layer compose files - #50

Merged
harrisoncramer merged 1 commit into
mainfrom
compose-file-list
Jul 15, 2026
Merged

harrisoncramer merged 1 commit into
mainfrom
compose-file-list

Conversation

@harrisoncramer

Copy link
Copy Markdown
Owner

Re-opens the change from #48 for review (that PR was merged prematurely and reverted in #49; nothing was released).

run points COMPOSE_FILE at the base compose file plus the secret override it regenerates, and sets that variable itself, which suppresses docker's own layering (the automatic docker-compose.override.yml and any inherited COMPOSE_FILE). So there was no first-class way to layer a local compose file over the base when running through ultra, and consumers were shell-wrapping the exec'd command to re-append to COMPOSE_FILE.

This makes --compose-file behave like docker's own -f: pass it more than once and the files are ordered on COMPOSE_FILE as given, so a later file wins over an earlier one. The common case is a developer keeping a gitignored override next to the base to tweak non-secret config for local dev. The generated secrets override stays last so resolved secrets are never shadowed, and service-name scoping now unions services across every base file. Single --compose-file usage is unchanged, so this is backward compatible.

run's --compose-file now works like docker's own -f: pass it more than
once and the files are set on COMPOSE_FILE in order, so a later file (a
gitignored local override a developer layers on) wins over an earlier
one. The generated secrets override is still appended last, so resolved
secrets are never shadowed. Service-name scoping unions the services
declared across every base file.
@harrisoncramer
harrisoncramer merged commit 696d5f4 into main Jul 15, 2026
12 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