Skip to content

Commit f33e5f9

Browse files
committed
add healthcheck
1 parent 88cc6b5 commit f33e5f9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/concepts/compose-support.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,23 @@ environment:
100100
MYSQL_ROOT_PASSWORD: example
101101
```
102102

103+
### `healthcheck`
104+
(Optional, but required for healthchecks on services with a published port)
105+
106+
The healthcheck endpoints for the container. Note that `curl` is commonly used for containers with a `slim` based image, and `wget` is used for containers with an `alpine` based image.
107+
108+
```yaml
109+
healthcheck:
110+
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
111+
```
112+
113+
or
114+
115+
```yaml
116+
healthcheck:
117+
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
118+
```
119+
103120
### `image`
104121
(Required, unless `build` is defined)
105122

0 commit comments

Comments
 (0)