Skip to content

Commit f13e6d4

Browse files
koki-developclaude
andcommitted
docs: document /healthz endpoint and add Docker healthcheck
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2f89b3e commit f13e6d4

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ $ docker compose up
102102

103103
### API
104104

105+
#### `GET /healthz`
106+
107+
Returns the service health status. Intended for load balancer health checks, Docker health checks, and Kubernetes liveness probes.
108+
109+
Response:
110+
111+
```json
112+
{"status":"ok"}
113+
```
114+
105115
#### `POST /v1/run`
106116

107117
Request:

compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ services:
99
command: ["serve", "--run-timeout", "10", "--compile-timeout", "10"]
1010
ports:
1111
- "8080:8080"
12+
healthcheck:
13+
test: ["CMD", "curl", "--fail", "http://localhost:8080/healthz"]
14+
interval: 10s
15+
timeout: 5s
16+
retries: 3
17+
start_period: 5s

0 commit comments

Comments
 (0)