Recent versions of docker-compose support “profile” attribute that allows to selectively start a subset of services declared in the docker-compose file.
More info here: https://docs.docker.com/compose/profiles/
Hello @AndMaz first of all welcome to the balena community and apologizes to reply you so late!
You are right, other members from the community requested this feature lately as well. I want to thank you for collecting these forums messages. I added all of this information internally for this feature request.
First of all, we still do not support the profile attribute as it belongs to docker-compose v3. At the moment we support most of the v2.1-2.2 and working on the v2.4 currently. Internally some people see this interesting but sadly this is not implemented yet.
Some ideas or workarounds that you can use today are:
comment your services and push different releases (A / B) on balenaCloud and then pin the releases to the devices (tag the image to maintain the image data).
use an envvar and then exit services if the envvar is set to a specific value.