Balena deployment with two containers, A and B. Both are marked as restart: unless-stopped in the docker-compose.yml file.
Manually stop container A using the Balena console.
Update an environment variable for container B.
Expected behaviour
Only container B should be restarted.
Observed behaviour
Both containers A and B are restarted.
Issue
Why are the unless-stopped restart semantics for container A not being observed? It was manually stopped, so why is it being restarted? Is there a way to work around this?
Hi. Environment variables are documented here. Setting device-wide environment variables will restart all services. On the other hand, setting service variables (Device Service Variables in the device’s dashboard page) will only restart the affected service, which is the behavior you want.
On the other hand, setting service variables (Device Service Variables in the device’s dashboard page) will only restart the affected service, which is the behavior you want.
That’s not what I’m observing, though, which is why I started this thread.