is it possible to specify in the balena.yml which docker-compose.yml to use?
I got the case that one repo contains the code and shall work with a specific “standalone” docker-compose- but for “One Click Deploy” via balenaCloud in need to specify a different docker-compose - and I don’t want to replicate all code and host it in different repos.
So… is there a way to make something like this in a balena.yaml
or alternatively make the balena-cli, balenaCloud and ALL other logic to prefer e.g. a “balena-compose.yml” if it exists before a “docker-compose.yml”? (Probably hardcoding it into balena.yml would be preferable, as it is much more reliable and has less impact).
Hey @nmaas87 that’s a very good question. I think at the moment this is not possible yet, but it’s a good feature request. Let me create an internal discussion about this and we will keep you updated.
On the other hand, why do you think it’s not possible to have a shared docker-compose for both deployments? (“standalone” docker and balena)?
In this specific case: The docker-compose pointed to a still-private image and so I had to use a different docker-compose (with build instruction) to build it. And now I think about the pros and cons of having a “maybe outdated” image linked - versus being able to build a fresh copy from Github via balenaCloud / deploy. Have to admit, I like the build method a lot better.
I’d like to maybe get balena.yml into RAKwireless official udp-packet-forwarder repo, so that one can gain the ability to deploy without me having to always fetch the upstream and change two-three files so that it works again / stays at latest version and not becomes stale.
Sure.
The image is now public so you don’t have to have a seperate docker-compose.yml file to build it, you can fetch it directly. @nmaas87, if you do a PR with the required changes to support balena out of the box we will gladly merge them !
Perfect, I will do so later (after syncing up to your latest changes so the PR should be very minimal)
Edit: Done
@mpous Maybe still keep the idea up, I know it is work, but I guess there would be other usecases than mine in having more flexibility with the deploy method / being able to choose the used docker-compose file - if you and the team see it the same
Perfect!
Please bear in mind that it would be nice if you could change the “version” element in the balena.yml each time you increase the version of the software as well. It is not strictly necessary, but the user will then know which version she/he is running