-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Extend an entire Compose file #1987
Comments
+100 #1 BUT, I guess you imply this but should be mentioned: it should keep the volume and link setup so you don't need to re define that. #2 because of #1 it will have different semantics then extend. And personally I think it should allow composition, so that means "import" semantics. Example import application 1 and 2 and make them talk together by means of link/own-container.. |
@bfirsh Let's assume a dev has a Compose file |
If one config depends on another, I would expect that dependency to be declared as part of the contents of the file, instead of a command line argument. |
It doesn't, it belongs to the operator. This way, the operator only needs to have its own compose file for its own infrastructure. Thus, for 10000 developers with 10000 different compose files, the single operator could easily override all options the he intended on any developer's compose file as:
|
After some discussion, @dnephin and I came up with the following:
This caters to the use case of wanting to configure an app for multiple environments: put the core stuff in It also caters to the use case of wanting to distribute an app's code with sensible defaults, but allowing people to override it when running it locally (for which one solution has already been proposed in #1999):
One limitation is that it can't currently serve both use cases at once. |
I agree with @dnephin ,But I guess that both of the solutions are good. The |
It is a common pattern to define a base Compose file, and then define Compose files for different environments with a few small changes.
It is currently possible to extend single services, but it is very verbose to include a large number of services and make a small change to one of them (for example, setting
RAILS_ENV=production
).It should be possible to extend a Compose file with a complete set of services from another Compose file. All of those services will be copied into the Compose file, as if you were extending each of the services individually:
This is an intentionally simple first step, and I am intentionally not defining a syntax so we can discuss.
Design questions:
Related issues / suggested designs: #318 #1380 dcao-merge
(This is part of an initiative to define an app once in a way that can be used across dev, test and prod.)
The text was updated successfully, but these errors were encountered: