compose/pkg/e2e/fixtures/restart-test/compose-depends-on.yaml
Guillaume Lours 3cfbac6624
restart only needed services by checking depends_on relations
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-01 18:22:40 +01:00

21 lines
426 B
YAML

services:
with-restart:
image: alpine
command: tail -f /dev/null
depends_on:
nginx: {condition: service_healthy, restart: true}
no-restart:
image: alpine
command: tail -f /dev/null
depends_on:
nginx: { condition: service_healthy }
nginx:
image: nginx:alpine
healthcheck:
test: "echo | nc -w 5 localhost:80"
interval: 2s
timeout: 1s
retries: 10