intermediateDocker Compose: Services, Networks, Volumes, Scaling & Health Checks
Does depends_on guarantee a dependency is ready before the dependent service starts?
Not by default — depends_on only guarantees container start order, not application readiness. To wait for actual readiness, the dependency needs a healthcheck: block, and the dependent service must declare depends_on with condition: service_healthy, which makes Compose wait until that healthcheck reports healthy before starting the dependent service.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.
Does depends_on guarantee a dependency is ready before the dependent service starts?