CLI Support for Non-Default or Multiple Compose files

Docker compose has a feature to support multiple or non-default “docker-compose.yml” filenames using the “-f” flag.

It would be extremely helpful to be able to change the docker-compose filename during “push” and “deploy”.

Ideally, this would support the full merging rules, but for most use cases it would be sufficient to just allow using a different filename.

See the original long-running issue here, which has had general support from users: Add ability to select a docker-compose file · Issue #1142 · balena-io/balena-cli · GitHub

The behavior in Add support for docker-compose dev overlay by srlowe · Pull Request #2177 · balena-io/balena-cli · GitHub (to merge docker-compose.dev.yml) is not sufficient to solve this because it creates confusion against the normal docker compose behavior where users would explicitly specify the files they want loaded.

Jonathan Berger set the status to In Progress

Hi Chris, we recognize that this is a valid use case and a long standing request from the CLI users. Our engineering team is looking at bringing the -f flag option to the CLI, we will let you know when we have updates.