Skip to content

Commit 50d5c80

Browse files
committed
add healthcheck for llama stack and lightspeed stack to docker compose
1 parent 6182cd7 commit 50d5c80

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docker-compose.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ services:
1212
- OPENAI_API_KEY=${OPENAI_API_KEY}
1313
networks:
1414
- lightspeednet
15+
healthcheck:
16+
test: ["CMD", "curl", "-f", "http://localhost:8321/v1/health"]
17+
interval: 10s # how often to run the check
18+
timeout: 5s # how long to wait before considering it failed
19+
retries: 3 # how many times to retry before marking as unhealthy
20+
start_period: 15s # time to wait before starting checks
1521

1622
lightspeed-stack:
1723
build:
@@ -25,9 +31,16 @@ services:
2531
environment:
2632
- OPENAI_API_KEY=${OPENAI_API_KEY}
2733
depends_on:
28-
- llama-stack
34+
llama-stack:
35+
condition: service_healthy
2936
networks:
3037
- lightspeednet
38+
healthcheck:
39+
test: ["CMD", "curl", "-f", "http://localhost:8080/liveness"]
40+
interval: 10s # how often to run the check
41+
timeout: 5s # how long to wait before considering it failed
42+
retries: 3 # how many times to retry before marking as unhealthy
43+
start_period: 5s # time to wait before starting checks
3144

3245
networks:
3346
lightspeednet:

0 commit comments

Comments
 (0)