Add healthcheck

This commit is contained in:
2022-02-05 11:31:45 +03:00
parent f210420a46
commit 2cdf5c9ac1
3 changed files with 18 additions and 0 deletions

11
scripts/healthcheck.py Normal file
View File

@@ -0,0 +1,11 @@
import os
import httpx
response = httpx.get(
"http://localhost:8080/healthcheck",
headers={"Authorization": os.environ["API_KEY"]},
)
print(f"HEALTHCHECK STATUS: {response.status_code}")
exit(0 if response.status_code == 200 else 1)