Modify docker-compose.yml without pushing an update

I frequently find that I need to change the docker-compose.yml file to change an entrypoint command or sometimes to modify volume mount points.

In particular, I frequently need to switch from running a deployment that requires access to a particular device (/dev/video0), to running one that doesn’t require access to that device.

I need to do this because I need access to the video device for getting images, but my standard application cannot allow that (for various reasons too complicated to get into here).

I want a way to modify the docker-compose.yml file without pushing a new update to the device (for data and time reasons). Ideally, this would be possible by way of balenaCloud, but I could also ssh into the host os and change it there if a dashboard interface is infeasible.

There is no way to do it as I’m aware of. As a workaround, maybe you can have two entries in docker compose with same code and different config? So that you run both variants.

Good idea! Would that require a multicontainer application?

Hi @cnr,

That would require multicontainer, since you’d be effectively running two separate containers (even though they are nearly equivalent). You can read more about the nuances of multicontainer here: https://www.balena.io/docs/learn/develop/multicontainer/.

But then I have to pay for multicontainer to have access to this feature, right?

I would prefer not to have to do that. I think the data costs of pushing an update are lower than the monthly for multicontainer, especially in light of the fact that this would be a very tiny reason to need to upgrade to a multicontainer app.

Any other ideas?

“Starter” apps are capable of multicontainer and included in the Free plan: https://www.balena.io/docs/learn/manage/app-types/

I have the “Essentials” app, unfortunately :confused:

Sorry, not sure I understand. If you have an “Essentials” app then you’re already on a paid plan which also means you can have a “Microservices” app which is also capable of multicontainer, and I longer see the issue.

I guess maybe I’m understanding this incorrectly then:

And the purpose of this:

@cnr the screenshot from the Pricing page is about additional devices, that is over the count allowed by the plan you have subscribed. Like the text on that page says, the Pilot plan includes 50 devices and beyond that you would be charged accordingly based on the type the app they belong to is.

Ok, let’s proceed with the assumption that I don’t want to use the multicontainer solution because I don’t want to pay $3 / additional device / month over the 20 limit of the prototype plan, I would prefer the $2 / additonal device / month with the single container solution.

Are there other ways I could achieve the desired goal of modifying the docker-compose.yml file/running a container with a different entrypoint without pushing an update?

There isn’t as far as I know. However I don’t think the b/w usage is of any actual significance if you limit the changes to entrypoint, command or mounts in docker-compose.yml, because of image layer reuse.

Ok, thank you for your help.

It does at least tend to be time consuming and inconvenient, if not b/w heavy, and perhaps worth putting on the radar in case other users also encounter this issue.

Thanks :slight_smile: