Исправление healthcheck: правильный путь и передача API ключа

This commit is contained in:
2026-01-28 20:54:54 +03:00
parent 89afd8f2cd
commit 4acc57a0f8

View File

@@ -32,7 +32,7 @@ services:
- RAG_AUTOSAVE_INTERVAL=${RAG_AUTOSAVE_INTERVAL:-600}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
test: ["CMD", "python", "-c", "import urllib.request, os; key = os.getenv('RAG_API_KEY', ''); req = urllib.request.Request('http://localhost:8000/api/v1/health'); req.add_header('X-API-Key', key) if key else None; urllib.request.urlopen(req)"]
interval: 30s
timeout: 10s
retries: 3