services: a: image: nginx:alpine ports: [80] healthcheck: test: wget --spider -S -T1 http://localhost:80 interval: 1s timeout: 1s b: image: nginx:alpine ports: [80] depends_on: - a healthcheck: test: wget --spider -S -T1 http://localhost:80 interval: 1s timeout: 1s