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
The ability to "include" a compose file into a parent file is incredibly powerful for supporting modular compose configurations. However, a key missing feature is the ability to add a global profile to the included file from the parent compose file.
Our use case is having multiple the ability to split a super compose file into separate child compose files, but allowing control over which child compose files are started by default. For example, we have a parent compose file that spins up most of the stack needed for resting. However, we have a separate compose file for the components related to our internal dashboard (this includes frontend, backend, and agent services). We would like the ability to optionally start the dashboard services from the main compose file when needed.
While we could define the profile on services in the "child" compose file, this is not desirable as then the child compose file can no longer be independently used without always starting the profile.
The ideal solution would be to add profiles as a configuration key alongside path under include and automatically extend all services from the included configuration with the defined profiles.
The text was updated successfully, but these errors were encountered:
IIUC you'd like to have an optional dashboard.yaml included as you run docker compose --profile dashboard up
Can't you just run explicitly this sibling compose file as docker compose -f compose.yaml -f dashboard.yaml up ?
Can't you just run explicitly this sibling compose file as docker compose -f compose.yaml -f dashboard.yaml up ?
Sure, but there may be many such things and the ergonomics of knowing and discovering what you can use can be complicated (e.g. dashboard.yaml could be in some nested subfolder). Also, things get extra complicated if we want to have services in compose.yaml that potentially depend on services within dashboard.yaml but are all started under the same profile.
Description
The ability to "include" a compose file into a parent file is incredibly powerful for supporting modular compose configurations. However, a key missing feature is the ability to add a global profile to the included file from the parent compose file.
Our use case is having multiple the ability to split a super compose file into separate child compose files, but allowing control over which child compose files are started by default. For example, we have a parent compose file that spins up most of the stack needed for resting. However, we have a separate compose file for the components related to our internal dashboard (this includes frontend, backend, and agent services). We would like the ability to optionally start the dashboard services from the main compose file when needed.
While we could define the profile on services in the "child" compose file, this is not desirable as then the child compose file can no longer be independently used without always starting the profile.
The ideal solution would be to add
profiles
as a configuration key alongsidepath
underinclude
and automatically extend all services from the included configuration with the defined profiles.The text was updated successfully, but these errors were encountered: