fix: use IMMICH_HOST env var in ML healthcheck (#19844)

Fixes #19843
This commit is contained in:
bo0tzz 2025-07-15 00:08:29 +02:00 committed by GitHub
parent ccd0c35ca1
commit 3a854d77ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,9 +4,12 @@ import sys
import requests
port = os.getenv("IMMICH_PORT", 3003)
host = os.getenv("IMMICH_HOST", "0.0.0.0")
host = "localhost" if host == "0.0.0.0" else host
try:
response = requests.get(f"http://localhost:{port}/ping", timeout=2)
response = requests.get(f"http://{host}:{port}/ping", timeout=2)
if response.status_code == 200:
sys.exit(0)
sys.exit(1)