advancedTop 100 Interview Questions
Why doesn't `depends_on` alone guarantee a dependency is ready to accept connections?
By default, `depends_on` only waits for the dependency's container to start, not for the application inside it to finish initializing (e.g., a database accepting connections). Use `depends_on: condition: service_healthy` paired with a proper HEALTHCHECK to actually wait for readiness.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.
Why doesn't `depends_on` alone guarantee a dependency is ready to accept connections?