From d004be2f6bcf40ee8a1a076396c9fb17467a68ef Mon Sep 17 00:00:00 2001 From: Hsukqi Lee Date: Thu, 3 Sep 2026 21:56:54 +0800 Subject: [PATCH] docs: add healthcheck example Document an HTTP healthcheck in the Quick Start Compose example.\n\nAssisted-by: OpenCode:gpt-5.6-sol Signed-off-by: Hsukqi Lee --- AI_AGENT_DISCLOSURE.md | 4 ++++ README.md | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 AI_AGENT_DISCLOSURE.md diff --git a/AI_AGENT_DISCLOSURE.md b/AI_AGENT_DISCLOSURE.md new file mode 100644 index 0000000000..042d97d3ed --- /dev/null +++ b/AI_AGENT_DISCLOSURE.md @@ -0,0 +1,4 @@ +This contribution was prepared by an AI agent acting on a human's behalf. +The human submitter may not have independently reviewed or tested the change. + +2026-09-03 diff --git a/README.md b/README.md index 3481dfc765..a7d3938891 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,18 @@ services: - "5000:5000" volumes: - .:/code + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5000"] + interval: 30s redis: image: redis ``` +The `healthcheck` tells Compose how to determine whether a service is healthy. In +this example, Compose runs `curl` inside the `web` container every 30 seconds +to check port 5000 and considers the service healthy when the HTTP request +succeeds. The image built for `web` must include `curl`. + Contributing ------------