Add Healthcheck cheatsheet (#1892)

This commit is contained in:
Léni Marvaud 2022-11-01 03:26:22 +01:00 committed by GitHub
parent 09d5779281
commit 0a6785c3f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -196,6 +196,18 @@ services:
- project_db_1:mysql
```
### Healthcheck
```yaml
# declare service healthy when `test` command succeed
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
```
### Hosts
```yaml