Repository navigation
feat(run): accept repeatable --compose-file to layer compose files - #50
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.