Balena should Support MultiStage Compose file and any located compose file

Hello Folks,

Balena has great feature, but if it will have following feature, it would be better.

1: Balena is able to support multistage compose file.
I can have docker-compose.yml and docker-compose.dev.yml in nomal, docker can execute these file in this way: docker-compose -f docker-compse.yml -f docker-compose.dev.yml
balen also can do this.

2: Currently, balena look at docker-compose.yml in the root directory. I want to locate compose file in different directory. Balena should support this. maybe during pushing source code to balena via balena cli, i can determine that where is the located compose file.

These are my hummble suggestion. balena is greate project and it can be better than better :slight_smile:

Many Thanks,
With My Best Regards,

Hello there,
for (1), Balena has special support for docker-compose.dev.yml, it is automatically used when you do a push to a local device (e.g. balena push affe1234.local), but we currently don’t intend to support arbitrary lists of compose files, because our focus are fleets of devices that run the same software. We are working on allowing to enable/disable individual services per devices though (no ETA yet)
for (2) why do you want this? Just like a Dockerfile doesn’t allow you to reference things in its parent directory, we don’t want compose files to do so, for security reasons. But if everything you want to reference in your compose file is below the compose file’s directory, it shouldn’t be a problem if the compose file is not in the root of your repository. You just have to cd into the directory which contains the file and do your balena push myApp from there
Hope that helped!