diff --git a/docker-compose.md b/docker-compose.md index a8ad22f7c..585e60197 100644 --- a/docker-compose.md +++ b/docker-compose.md @@ -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