r/docker • u/NoDevelopment206 • 4h ago
how do you set up healthchecks in compose, and has a bad one ever restarted a perfectly fine container
2
Upvotes
been thinking about this after seeing a healthcheck that just curled the app root every 5s with a 2s timeout. app was fine, just slow on startup, and it kept getting marked unhealthy and restarted in a loop.
what do you actually check in yours? a real /health endpoint, a tcp port check, or nothing at all? and do you use start_period or just set long intervals?
curious what has bitten people here