Nikhil Benesch c5cdce0b60 Don't wait forever for unhealthy dependencies
The previous code would wait for dependencies to become healthy forever,
even if they'd become unhealthy in the meantime. I can't find an issue
report for this bug, but it was described in a comment on the PR that
introduced the `--wait` flag [0].

[0]: https://github.com/docker/compose/pull/8777#issuecomment-965643839

Signed-off-by: Nikhil Benesch <nikhil.benesch@gmail.com>
2022-01-07 19:13:43 +01:00

15 lines
257 B
YAML

services:
fail:
image: alpine
command: sleep infinity
healthcheck:
test: "false"
interval: 1s
retries: 3
depends:
image: alpine
command: sleep infinity
depends_on:
fail:
condition: service_healthy