mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-16 01:59:56 -05:00
[GH-ISSUE #579] Allow changing default compose.yaml
#19758
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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 tocompose.yamlto preserve the behavior, but in the future its default should probably change todocker-compose.yamlto follow typical conventions.@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.
@awmath commented on GitHub (Jun 13, 2025):
Docker itself states in their docs that the compose.yaml is the default.
The same can be found in the compose spec:
@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.
@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.
@kiler129 commented on GitHub (Jun 17, 2025):
@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 showsdocker-compose.yamlis more popular. At present, on GitHub we have:docker-compose.ymlfilesdocker-compose.yamlfilescompose.yamlfilescompose.ymlfilesDespite 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?
@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
@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. Thisfile_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.@gutenye commented on GitHub (Aug 31, 2025):
@mbecker20 How can I configure
file_pathsoption in thecore.config.tomlfile? Make it default for all stacks.