mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix(ml): Resolve IPv6 startup crash and healthcheck failure (#22387)
* fix(ml): Resolve IPv6 startup crash and healthcheck failure Fixes #13782 * fix(ml): updated the fix to use the std lib * Apply code formatting to __main__.py
This commit is contained in:
parent
075436a5d1
commit
51150a3ed1
2 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
from ipaddress import ip_address
|
||||
from pathlib import Path
|
||||
|
||||
from .config import log, non_prefixed_settings, settings
|
||||
|
|
@ -12,6 +13,11 @@ else:
|
|||
|
||||
module_dir = Path(__file__).parent
|
||||
|
||||
bind_host = non_prefixed_settings.immich_host
|
||||
if ip_address(bind_host).version == 6:
|
||||
bind_host = f"[{bind_host}]"
|
||||
bind_address = f"{bind_host}:{non_prefixed_settings.immich_port}"
|
||||
|
||||
try:
|
||||
with subprocess.Popen(
|
||||
[
|
||||
|
|
@ -24,7 +30,7 @@ try:
|
|||
"-c",
|
||||
module_dir / "gunicorn_conf.py",
|
||||
"-b",
|
||||
f"{non_prefixed_settings.immich_host}:{non_prefixed_settings.immich_port}",
|
||||
bind_address,
|
||||
"-w",
|
||||
str(settings.workers),
|
||||
"-t",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue