Fix Docker healthcheck to check app's own health endpoint

Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-19 17:51:43 +00:00
parent f52e2d0956
commit 8c34d211e3

View File

@@ -5,9 +5,8 @@ import os
def check_health():
try:
host = os.environ.get('ADGUARD_HOST', 'localhost')
port = os.environ.get('ADGUARD_PORT', '8000')
url = f'http://{host}:{port}/health'
port = os.environ.get('APP_PORT', '8000')
url = f'http://localhost:{port}/health'
with httpx.Client() as client:
response = client.get(url)
response.raise_for_status()