Add healthcheck

This commit is contained in:
2023-05-17 17:06:38 +02:00
parent 281f1425de
commit 403849c483
2 changed files with 11 additions and 6 deletions

View File

@@ -1,8 +1,11 @@
import os
import httpx
response = httpx.get(
"http://localhost:8080/healthcheck",
)
print(f"HEALTHCHECK STATUS: {response.status_code}")
CHECK_URL = os.environ.get("HEALTHCHECK_URL", "http://localhost:8080/healthcheck")
response = httpx.get(CHECK_URL)
print(f"HEALTHCHECK STATUS: {response.text}")
exit(0 if response.status_code == 200 else 1)