Skip to content

Ability to inline overrides for included Compose files #13212

@mikesir87

Description

@mikesir87

Description

Feature request - I would like the ability to embed the overrides for an included Compose file without having to write, publish, and maintain another Compose file.

Ideal solution

Taking the example from the include docs that overrides the ports/volumes for included services, I could reduce the usage of multiple Compose files to a single one:

include: 
  - path: ["team-1/compose.yaml"]
    override:
      services:
        service-1:
          ports:
            - 2345:2345
  - path: ["team-2/compose.yaml"]
    override:
      services:
        service-2:
          volumes:
            - ./data:/data

The idea is that the include[].override value is an embedded Compose file.

Why this matters

I'm working on some capabilities in which there will be a base Compose file that will be published and extended to be included in children Compose files. But, they will need to make some changes to it (ports being one of them). Folks will then publish these Compose files and allow others to run it directly.

With the current limitations, authors will need to publish both their final Compose file, as well as the overrides. Or, skip the entire include portion and inline everything.

Having the ability to inline the Compose file streamlines the process by having one less file to publish, version, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions