Implement 'healthcheck' option
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
466ebb6cc1
commit
716a6baa59
9 changed files with 172 additions and 9 deletions
24
tests/fixtures/healthcheck/docker-compose.yml
vendored
Normal file
24
tests/fixtures/healthcheck/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
version: "3"
|
||||
services:
|
||||
passes:
|
||||
image: busybox
|
||||
command: top
|
||||
healthcheck:
|
||||
test: "/bin/true"
|
||||
interval: 1s
|
||||
timeout: 30m
|
||||
retries: 1
|
||||
|
||||
fails:
|
||||
image: busybox
|
||||
command: top
|
||||
healthcheck:
|
||||
test: ["CMD", "/bin/false"]
|
||||
interval: 2.5s
|
||||
retries: 2
|
||||
|
||||
disabled:
|
||||
image: busybox
|
||||
command: top
|
||||
healthcheck:
|
||||
disable: true
|
||||
2
tests/fixtures/v3-full/docker-compose.yml
vendored
2
tests/fixtures/v3-full/docker-compose.yml
vendored
|
|
@ -29,7 +29,7 @@ services:
|
|||
constraints: [node=foo]
|
||||
|
||||
healthcheck:
|
||||
command: cat /etc/passwd
|
||||
test: cat /etc/passwd
|
||||
interval: 10s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue