Skip to content

Commit aa8a6a1

Browse files
authored
Merge pull request #81 from DefangLabs/eric/fix-long-llm-health-check
2 parents 6d40a97 + b731c9c commit aa8a6a1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

compose.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ services:
5959
environment:
6060
- OPENAI_API_KEY=${OPENAI_API_KEY}
6161
healthcheck:
62-
test: ["CMD", "curl", "-f", "http://localhost/health"]
62+
test:
63+
- CMD
64+
- python3
65+
- -c
66+
- import sys, urllib.request; sys.exit(0 if urllib.request.urlopen('http://localhost/health').getcode() == 200 else 1)
67+
interval: 10s
68+
timeout: 5s
69+
retries: 3
70+
start_period: 60s
6371

6472
discord-bot:
6573
restart: unless-stopped

0 commit comments

Comments
 (0)