Add healthcheck

This commit is contained in:
2022-02-05 10:45:54 +03:00
parent 64e1fd33e7
commit 30d49c0844
5 changed files with 91 additions and 7 deletions

11
scripts/healthcheck.py Normal file
View File

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