From f702356f48318cfa85b7c751673264179928f019 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 9 Dec 2025 03:14:24 +0300 Subject: [PATCH] fix: healthcheck command to include API key in requests --- README.md | 4 ++-- docker-compose.local.yml | 2 +- docker-compose.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e68f0cfd..c7a32b23 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ services: networks: - bot_network healthcheck: - test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8080/health\", timeout=5)' || exit 1"] + test: ["CMD-SHELL", "python -c \"import requests, os; requests.get('http://localhost:8080/health', headers={'X-API-Key': os.environ.get('WEB_API_DEFAULT_TOKEN')}, timeout=5) or exit(1)\""] interval: 60s timeout: 10s retries: 3 @@ -400,7 +400,7 @@ services: - bot_network - remnawave-network # Подключаем к сети панели healthcheck: - test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8080/health\", timeout=5)' || exit 1"] + test: ["CMD-SHELL", "python -c \"import requests, os; requests.get('http://localhost:8080/health', headers={'X-API-Key': os.environ.get('WEB_API_DEFAULT_TOKEN')}, timeout=5) or exit(1)\""] interval: 60s timeout: 10s retries: 3 diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 1b9a624f..26893b7c 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -71,7 +71,7 @@ services: - bot_network - remnawave-network # Подключаем к сети панели healthcheck: - test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8080/health\", timeout=5)' || exit 1"] + test: ["CMD-SHELL", "python -c \"import requests, os; requests.get('http://localhost:8080/health', headers={'X-API-Key': os.environ.get('WEB_API_DEFAULT_TOKEN')}, timeout=5) or exit(1)\""] interval: 60s timeout: 10s retries: 3 diff --git a/docker-compose.yml b/docker-compose.yml index 0ad610be..c62611f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,7 +76,7 @@ services: networks: - bot_network healthcheck: - test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8080/health\", timeout=5)' || exit 1"] + test: ["CMD-SHELL", "python -c \"import requests, os; requests.get('http://localhost:8080/health', headers={'X-API-Key': os.environ.get('WEB_API_DEFAULT_TOKEN')}, timeout=5) or exit(1)\""] interval: 60s timeout: 10s retries: 3