mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2026-03-22 17:46:04 -04:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user