Skip to content

Adding profiles: as a top level entry to the root compose #13919

Description

@G3nomaly

Description

So normally u can use the docker compose up command with the --profile tag to run any profile from the root compose. This works great, but I generally do not like flags in production code as it requires people to write / use it consistently, which is just hard to enforce. Something that would solve this in my opinion. is adding the profiles field to the root compose. allowing us to run the profiles through a button similar to how the current services work in vscode. imo this just prevents drift between team members way better.

Image

At the same time, I am just a random dev. So do with these ideas however u like. Most likely, u have plenty of PRs and suggestions overwhelming u every day due to the rise in ai.

Just know, I love this software :D thank u very much

# Root compose.yaml
version: "4.0"

# 1. Native includes pulling in the raw module files
include:
  - path: ./modules/auth/compose.yaml
  - path: ./modules/billing/compose.yaml
  - path: ./modules/accounting/compose.yaml

# 2. Global Control Plane: Tweaking behavior for profile-tagged services
profiles:
  billing:
    unify_prefix: true
    group: false
    group_network: true
    env_file: .env.billing

  accounting:
    unify_prefix: false
    group: false
    group_network: true
    env_file: .env.accounting

  complete-stack:
    unify_prefix: false
    group: true
    group_network: true
    env_file: .env.global

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions