1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-07 23:03:36 +02:00

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

View File

@ -4,9 +4,12 @@ import sys
import requests import requests
port = os.getenv("IMMICH_PORT", 3003) 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: 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: if response.status_code == 200:
sys.exit(0) sys.exit(0)
sys.exit(1) sys.exit(1)