HEALTHCHECK tells the orchestrator when the app is actually up
A container is "running" the moment the process starts, which is before the app can serve a request. A health check makes "up" mean "answering".
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
CMD curl -fsS http://localhost:3000/health || exit 1Compose waits on it with depends_on: condition: service_healthy. Kubernetes has its own probes and ignores this one, so set both if you deploy there.
dockeroperations