You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use extends in the way that we have a base file and then for each environment we replace the significant parts that we want to override or have different.
In the current state of extends if you want to achieve the same you need almost rewrite everything.
Look at out actual example and how verbose it is. There are only two lines that matter.
A less verbose code is easy to maintain and understand
You can add remove service in the base.yaml without adding/removing entries in the children. (Missing a container in Prod because someone forgot to ad it as into the prod.yaml.
You can aggregate services into one.
The configuration can be easily created by CI or or maintained by an application.
You have a nice overview what gets set and you can check in this in a repo.
Currently compose extends is very verbose.
We use extends in the way that we have a base file and then for each environment we replace the significant parts that we want to override or have different.
In the current state of extends if you want to achieve the same you need almost rewrite everything.
Look at out actual example and how verbose it is. There are only two lines that matter.
common.yaml
child.yaml
With the new extends feature one would add a global_extends/import like this:
extended_child.yaml
Thats it.
Advantages
Main featues
see examples in Improve Compose extends and make it less verbose and more powerful. #1380 (comment)