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