A helper that needs a web server can start in the right order and still make its first request too early. A health check is a small test run by Docker to observe whether a service can do something useful, such as answer an HTTP request.
Docker Compose · Lesson 6
Service Dependencies
Learn to distinguish dependency startup order from a service that is ready to answer requests.