mirror of https://github.com/docker/cli.git
Support start_period for healthcheck in Docker Compose
Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
parent
21b5bbe411
commit
0abdad615f
|
@ -114,6 +114,7 @@ services:
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 1s
|
timeout: 1s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
# Any valid image reference - repo, tag, id, sha
|
# Any valid image reference - repo, tag, id, sha
|
||||||
image: redis
|
image: redis
|
||||||
|
|
|
@ -760,6 +760,7 @@ func TestFullExample(t *testing.T) {
|
||||||
Interval: "10s",
|
Interval: "10s",
|
||||||
Timeout: "1s",
|
Timeout: "1s",
|
||||||
Retries: uint64Ptr(5),
|
Retries: uint64Ptr(5),
|
||||||
|
StartPeriod: "15s",
|
||||||
},
|
},
|
||||||
Hostname: "foo",
|
Hostname: "foo",
|
||||||
Image: "redis",
|
Image: "redis",
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -324,7 +324,8 @@
|
||||||
{"type": "array", "items": {"type": "string"}}
|
{"type": "array", "items": {"type": "string"}}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"timeout": {"type": "string"}
|
"timeout": {"type": "string"},
|
||||||
|
"start_period": {"type": "string"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deployment": {
|
"deployment": {
|
||||||
|
|
|
@ -172,7 +172,7 @@ type HealthCheckConfig struct {
|
||||||
Timeout string
|
Timeout string
|
||||||
Interval string
|
Interval string
|
||||||
Retries *uint64
|
Retries *uint64
|
||||||
StartPeriod string
|
StartPeriod string `mapstructure:"start_period"`
|
||||||
Disable bool
|
Disable bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue