introduce include to depend on another compose file#363
introduce include to depend on another compose file#363ndeloof merged 1 commit intocompose-spec:masterfrom
include to depend on another compose file#363Conversation
68ab3a7 to
318a09e
Compare
milas
left a comment
There was a problem hiding this comment.
I like this a lot, in particular the long syntax will be very helpful for complex projects, I imagine!
Made a couple tiny suggestions for clarification/precision and I think we need a bit more clarification on paths
|
long syntax indeed let us introduce way much advanced features in the future to address complex usages, like includes/excludes/rename or any sort of such conflict resolution logic. |
4800534 to
559dfd5
Compare
require to depend on another compose fileinclude to depend on another compose file
include to depend on another compose fileimport to depend on another compose file
ulyssessouza
left a comment
There was a problem hiding this comment.
I think one important thing to mention here is the order in what -f files and compose.override.yml are merged (which already exists) and when the imports are evaluated.
Also maybe turn it explicit the recursive nature of the import. Because if we import a file that has imports, we need to evaluate those before integrating in the final project. And obviously manage circular dependency.
|
@ulyssessouza good point, added to #363 About circular references, the compose specification doesn't define such rule for |
import to depend on another compose fileinclude to depend on another compose file
|
@ulyssessouza comments have been addressed, can you please retrace request for change so I can merge ? |
glours
left a comment
There was a problem hiding this comment.
If you can apply those few changes I think we're ready to go!!!
milas
left a comment
There was a problem hiding this comment.
Nice clarifications to the spec. I think the JSON schema needs a couple tiny fixes but LGTM otherwise!
Signed-off-by: Nicolas De Loof <[email protected]>
|
May I ask for clarification? Example:
services:
foo:
image: busybox
services:
bar:
image: busybox
include:
- foo/docker-compose.yaml
- bar/docker-compose.yaml
|
What this PR does / why we need it:
introduce
includeto depend on another compose filethis will allow to modularize complex compose file, share some common definition with other teams, and also resolve issue for users to extend a compose file from a distinct folder
Which issue(s) this PR fixes:
illustrated by compose-spec/compose-go#416
closes docker/compose#318 after ... 9 years ! 😅