We’ve got a few services running on our devices that have dependencies between each other, most notably several services which need a local MQTT broker to be up before they can successfully start themselves.
Docker Compose supports dependencies between services, it would be great if that information could be used to block a service from starting until another service has passed a health check.
I agree with this! Waiting for service-healthy would be super helpful as it causes a lot of errors on startup when one service is dependent of another.
+1, I would honestly like to know why this feature wasn’t part of the default featureset. Seems like a no-brainer, especially since using systemd, you can get pretty complex and powerful service dependencies “for free”.
I ran into a similar issue. We have an audio processing service that has to be running before our UI service that uses it to initiate some web streams/audio output. If the UI service starts first, it fails to create the audio streams and displays errors to the user. We can obviously work around this with error handling/retries/wait loops, but it would be nice if we could push this off to the service initialization layer (e.g. compose).
+1, currently using scripts to workaround, but would love to streamline our code to run on balena devices as well as it runs on other compose scenarios