-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple compose files #603
Merged
jordanstephens
merged 15 commits into
main
from
jordan/simplify-handling-of-multiple-compose-files
Aug 6, 2024
Merged
Support for multiple compose files #603
jordanstephens
merged 15 commits into
main
from
jordan/simplify-handling-of-multiple-compose-files
Aug 6, 2024
Conversation
This file contains 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
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 2, 2024 18:42
2258b20
to
4b1032f
Compare
jordanstephens
commented
Aug 2, 2024
jordanstephens
commented
Aug 2, 2024
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
2 times, most recently
from
August 2, 2024 18:48
6ad28c1
to
ae05864
Compare
edwardrf
reviewed
Aug 2, 2024
lionello
reviewed
Aug 4, 2024
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 6, 2024 18:47
b6aebf5
to
f1f0a89
Compare
Use the compose-go library to find the default path if no path is passed instead of replicating their logic in our codebase. Once a path is obtained, we can derive the current working directory. If we are using default paths, we will test if there are potentially conflicting default compose files: compose.yaml _and_ docker-compose.yaml.
This reverts commit 954b6be.
This error is no longer used
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 6, 2024 18:54
f1f0a89
to
1200054
Compare
jordanstephens
changed the title
Warn instead of fail when a folder contains multiple compose files
Add support for multiple compose files
Aug 6, 2024
jordanstephens
changed the title
Add support for multiple compose files
Support for multiple compose files
Aug 6, 2024
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 6, 2024 19:54
1200054
to
93c37e2
Compare
lionello
approved these changes
Aug 6, 2024
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 6, 2024 22:10
02978c2
to
4e18bd5
Compare
jordanstephens
force-pushed
the
jordan/simplify-handling-of-multiple-compose-files
branch
from
August 6, 2024 22:15
4e18bd5
to
6341688
Compare
lionello
approved these changes
Aug 6, 2024
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.
Fixes #509 and #369
In #500, we were concerned that the presence of both a
compose.yaml
anddocker-compose.yaml
file could be confusing, so we decided to return an error and exit early. However,compose-go
does log out a warning in this scenario, as doesdocker compose
. We've changed our mind and decided to aim for closer parity with docker here by reverting to logging the warning and continuing withcompose.yaml
.While implementing this, in an effort to bring us to closer parity with docker compose, we decided to go ahead and add support for passing
-f
multiple times—adding support for multiple compose files.-f
.compose.LoadCompose
to leverage thecompose-go
library to find default compose file paths if one isn't passed explicitly.compose-go
will always pickcompose.yaml
overdocker-compose.yaml
. It will also log a warning message explaining this to stderr.toomany
test case since there is nothing meaningful to test anymore.defang version
to make sure it doesn't try to load a compose file during intialization. In time, we should add command-level tests for everything with a mock server.defang version
which do not use it.