mirror of
https://github.com/immich-app/immich.git
synced 2024-11-28 09:33:27 +02:00
15 lines
277 B
Python
15 lines
277 B
Python
|
import os
|
||
|
import sys
|
||
|
|
||
|
import requests
|
||
|
|
||
|
port = os.getenv("IMMICH_PORT", 3003)
|
||
|
|
||
|
try:
|
||
|
response = requests.get(f"http://localhost:{port}/ping", timeout=2)
|
||
|
if response.status_code == 200:
|
||
|
sys.exit(0)
|
||
|
sys.exit(1)
|
||
|
except requests.RequestException:
|
||
|
sys.exit(1)
|