[GH-ISSUE #579] Allow changing default compose.yaml #6181

Closed
opened 2026-04-24 19:17:43 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @kiler129 on GitHub (Jun 4, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/579

Currently, when either GIT or local file mode is used the following configuration is assumed:

Image

However, in most environments and examples from Docker the file is named docker-compose.yaml. Ideally, it would be great if Komodo could follow that convention by-default. However, that would be a BC-break. Instead, I propose to introduce a new configuration variable that specifies default compose YAML file. For now it could be set to compose.yaml to preserve the behavior, but in the future its default should probably change to docker-compose.yaml to follow typical conventions.

Originally created by @kiler129 on GitHub (Jun 4, 2025). Original GitHub issue: https://github.com/moghtech/komodo/issues/579 Currently, when either GIT or local file mode is used the following configuration is assumed: <img width="775" alt="Image" src="https://github.com/user-attachments/assets/f8d759b9-8f7e-4b99-8a58-9fc490b69c1c" /> However, in most environments and examples from Docker the file is named `docker-compose.yaml`. Ideally, it would be great if Komodo could follow that convention by-default. However, that would be a BC-break. Instead, I propose to introduce a new configuration variable that specifies default compose YAML file. For now it could be set to `compose.yaml` to preserve the behavior, but in the future its default should probably change to `docker-compose.yaml` to follow typical conventions.
Author
Owner

@BeastleeUK commented on GitHub (Jun 10, 2025):

This is the one thing that made me stop my migration to Komodo. Mine runs on UnRaid, which has a Docker management panel included that I use for quick monitoring and backups. That follows the standard convention for docker-compose.yml to detect stacks. This is paired with Portainer for actual management of the containers for now. Swapping out Komodo meant renaming all of them to compose.yml and then that stops the UnRaid part working.

Please allow for either option.

<!-- gh-comment-id:2958832248 --> @BeastleeUK commented on GitHub (Jun 10, 2025): This is the one thing that made me stop my migration to Komodo. Mine runs on UnRaid, which has a Docker management panel included that I use for quick monitoring and backups. That follows the standard convention for docker-compose.yml to detect stacks. This is paired with Portainer for actual management of the containers for now. Swapping out Komodo meant renaming all of them to compose.yml and then that stops the UnRaid part working. Please allow for either option.
Author
Owner

@awmath commented on GitHub (Jun 13, 2025):

Docker itself states in their docs that the compose.yaml is the default.

The Compose file

The default path for a Compose file is compose.yaml (preferred) or compose.yml that is placed in the working directory. Compose also supports docker-compose.yaml and docker-compose.yml for backwards compatibility of earlier versions. If both files exist, Compose prefers the canonical compose.yaml.

The same can be found in the compose spec:

https://github.com/compose-spec/compose-spec/blob/main/spec.md#compose-file

<!-- gh-comment-id:2971726469 --> @awmath commented on GitHub (Jun 13, 2025): Docker itself states in their docs that the compose.yaml is the default. > [The Compose file](https://docs.docker.com/compose/intro/compose-application-model/#the-compose-file) > > The default path for a Compose file is compose.yaml (preferred) or compose.yml that is placed in the working directory. Compose also supports docker-compose.yaml and docker-compose.yml for backwards compatibility of earlier versions. If both files exist, Compose prefers the canonical compose.yaml. The same can be found in the compose spec: > https://github.com/compose-spec/compose-spec/blob/main/spec.md#compose-file
Author
Owner

@pvyswiss commented on GitHub (Jun 17, 2025):

It shall be flexible. In our environment, we have for example 112 docker-compose.yml and only around 17 compose.yml files.

<!-- gh-comment-id:2979138698 --> @pvyswiss commented on GitHub (Jun 17, 2025): It shall be flexible. In our environment, we have for example 112 docker-compose.yml and only around 17 compose.yml files.
Author
Owner

@cyndane31 commented on GitHub (Jun 17, 2025):

In addition to the default stack-definition file, it would be VERY cool to be able to define a default template instead of the hello-world that is populated when komodo inits a new stack.

<!-- gh-comment-id:2981523004 --> @cyndane31 commented on GitHub (Jun 17, 2025): In addition to the default stack-definition file, it would be VERY cool to be able to define a default template instead of the hello-world that is populated when komodo inits a new stack.
Author
Owner

@kiler129 commented on GitHub (Jun 17, 2025):

(...) Swapping out Komodo meant renaming all of them to compose.yml and then that stops the UnRaid part working.

@BeastleeUK You don't need to swap them - Komodo allows you to specify one per-stack, as on the screenshot. It's just mild inconvenience really.

@awmath: My suspicion is because Docker attempts to encourage compose.<env>.yaml. However, the reality shows docker-compose.yaml is more popular. At present, on GitHub we have:

  • 1.2M of docker-compose.yml files
  • 225k of docker-compose.yaml files
  • 48.1k compose.yaml files
  • 43.6k of compose.yml files

Despite clear RFC recommendation even the most popular extension used is different :)

I personally think we should avoid bikeshedding here and get towards a more constructive solution that would improve UX, making everyone's time better.

@cyndane31: I think this is a great idea, but to prevent it from being swallowed here a new issue would be warranted.


Scope

I looked at the code and to make the change appears quite simple to add an environment configuration. Since the change appears to device folks I think environment configuration variable is really the best option here, as after all everyone has their own preferences applied in their own environment.

As for functionality:
e2280f38df/bin/periphery/src/compose/up.rs (L122-L126)

e2280f38df/bin/periphery/src/compose/write.rs (L393-L402)

e2280f38df/client/core/rs/src/entities/stack.rs (L52-L56)

As for documentation:
e2280f38df/frontend/public/client/types.d.ts (L2196-L2199)
e2280f38df/frontend/src/components/resources/stack/config.tsx (L508-L510)
e2280f38df/client/core/ts/src/types.ts (L2092-L2095)


Alternatives

I think in the future a more advanced mechanism could be added that searches for various compose files. Initially I was thinking this could be accomplished with glob syntax but this poses cross-platform/cross-filesystem challenges and creates an non-obvious order. But I think this is more of a "nice to have" rather than having a simple setting to set default compose file.

@mbecker20: any opinion on that vision-wise?

<!-- gh-comment-id:2982139980 --> @kiler129 commented on GitHub (Jun 17, 2025): > (...) Swapping out Komodo meant renaming all of them to compose.yml and then that stops the UnRaid part working. @BeastleeUK You don't need to swap them - Komodo allows you to specify one per-stack, as on the screenshot. It's just mild inconvenience really. @awmath: My suspicion is because Docker attempts to encourage `compose.<env>.yaml`. However, the reality shows `docker-compose.yaml` is more popular. At present, on GitHub we have: - [1.2M](https://github.com/search?q=path%3A**%2Fdocker-compose.yml&type=code&ref=advsearch) of `docker-compose.yml` files - [225k](https://github.com/search?q=path%3A**%2Fdocker-compose.yaml&type=code&ref=advsearch) of `docker-compose.yaml` files - [48.1k](https://github.com/search?q=path%3A**%2Fcompose.yaml&type=code&ref=advsearch) `compose.yaml` files - [43.6k](https://github.com/search?q=path%3A**%2Fcompose.yaml&type=code&ref=advsearch) of `compose.yml` files Despite [clear RFC recommendation](https://datatracker.ietf.org/doc/html/rfc9512#section-2.1-2.22.2.6) even the most popular extension used is different :) I *personally* think we should avoid [bikeshedding](https://en.wikipedia.org/wiki/Law_of_triviality) here and get towards a more constructive solution that would improve UX, making everyone's time better. @cyndane31: I think this is a great idea, but to prevent it from being swallowed here a new issue would be warranted. --- ### Scope I looked at the code and to make the change appears quite simple to add an environment configuration. Since the change appears to device folks I think *environment* configuration variable is really the best option here, as after all everyone has their own preferences applied in their own *environment*. **As for functionality:** https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/bin/periphery/src/compose/up.rs#L122-L126 https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/bin/periphery/src/compose/write.rs#L393-L402 https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/client/core/rs/src/entities/stack.rs#L52-L56 **As for documentation:** https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/frontend/public/client/types.d.ts#L2196-L2199 https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/frontend/src/components/resources/stack/config.tsx#L508-L510 https://github.com/moghtech/komodo/blob/e2280f38df975acb23f8453a3a414fd9ab7f2f92/client/core/ts/src/types.ts#L2092-L2095 --- ### Alternatives I think in the future a more advanced mechanism could be added that searches for various compose files. Initially I was thinking this could be accomplished with [glob syntax](https://man7.org/linux/man-pages/man7/glob.7.html) but this poses cross-platform/cross-filesystem challenges and creates an non-obvious order. But I think this is more of a "nice to have" rather than having a simple setting to set default compose file. @mbecker20: any opinion on that vision-wise?
Author
Owner

@BeastleeUK commented on GitHub (Jun 18, 2025):

@kiler129 Definitely more of an inconvenience and I am slowly rebuilding my Komodo instance, I have a huge central env file I want to get right in Komodo. Someone else has raised a feature request with the Unraid plugin developer to support the compose.yml/compose.yaml options too. IMO though any product managing compose stacks would be best built initially accommodating any naming convention that has historically been used by the compose capability (not just any naming I hasten to add). The stats you've posted show how people don't like change :D

<!-- gh-comment-id:2984291067 --> @BeastleeUK commented on GitHub (Jun 18, 2025): @kiler129 Definitely more of an inconvenience and I am slowly rebuilding my Komodo instance, I have a huge central env file I want to get right in Komodo. Someone else has raised a feature request with the Unraid plugin developer to support the compose.yml/compose.yaml options too. IMO though any product managing compose stacks would be best built initially accommodating any naming convention that has historically been used by the compose capability (not just any naming I hasten to add). The stats you've posted show how people don't like change :D
Author
Owner

@mbecker20 commented on GitHub (Aug 28, 2025):

Since 1.18.4, you can create Template Stacks which you can set your preferred defaults such as file_paths = ["docker-compose.yaml"]. Upon Stack creation, the Templates you make will be suggested as starting point. This is an improvement, but does not allow changing the Komodo internal default. This file_paths = ["docker-compose.yaml"] must remain on the resource TOML and configuration at this point. There's some other things relying on the fact that if its different than this, it will be explicitly in the Stack config, its not as easy as just adding env variable.

<!-- gh-comment-id:3232511023 --> @mbecker20 commented on GitHub (Aug 28, 2025): Since 1.18.4, you can create Template Stacks which you can set your preferred defaults such as `file_paths = ["docker-compose.yaml"]`. Upon Stack creation, the Templates you make will be suggested as starting point. This is an improvement, but does not allow changing the Komodo internal default. This `file_paths = ["docker-compose.yaml"]` must remain on the resource TOML and configuration at this point. There's some other things relying on the fact that if its different than this, it will be explicitly in the Stack config, its not as easy as just adding env variable.
Author
Owner

@gutenye commented on GitHub (Aug 31, 2025):

@mbecker20 How can I configure file_paths option in the core.config.toml file? Make it default for all stacks.

<!-- gh-comment-id:3239742280 --> @gutenye commented on GitHub (Aug 31, 2025): @mbecker20 How can I configure `file_paths` option in the `core.config.toml` file? Make it default for all stacks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#6181