修复 web 容器 healthcheck:用 python 替代不存在的 curl

This commit is contained in:
2569718930@qq.com
2026-05-18 23:00:03 +08:00
parent 473ed82202
commit 4d5a5b674d
+1 -1
View File
@@ -32,7 +32,7 @@ services:
- "127.0.0.1:8000:8000"
user: "${UID:-1000}:${GID:-1000}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/healthz"]
test: ["CMD", "python", "-c", "from urllib.request import urlopen; urlopen('http://localhost:8000/healthz')"]
interval: 30s
timeout: 5s
retries: 3