From 9e5173aa4ae49990e53b426dd6aeed8f2adbf42c Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 28 Jan 2026 20:52:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20healthcheck:=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20API=20=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=20=D0=B2=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D1=83=20?= =?UTF-8?q?=D0=B7=D0=B4=D0=BE=D1=80=D0=BE=D0=B2=D1=8C=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2fd5c6d..14ed41c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ ENV LOG_LEVEL=INFO # Порт приложения EXPOSE 8000 -# Healthcheck +# Healthcheck (будет переопределен в docker-compose.yml с API ключом) HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/v1/health')" || exit 1 diff --git a/docker-compose.yml b/docker-compose.yml index 4539989..10cddf8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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/api/v1/health')"] + test: ["CMD", "python", "-c", "import urllib.request, os; req = urllib.request.Request('http://localhost:8000/api/v1/health'); req.add_header('X-API-Key', os.getenv('RAG_API_KEY', '')); urllib.request.urlopen(req)"] interval: 30s timeout: 10s retries: 3