Files
mealie/mealie/scripts/healthcheck.py
Hayden 83a076bd8b feat: improve idle memory usage (#1758)
* health check as python script

* install crfpp model via python

* drop curl from finale container

* use uvicorn by default w/ gunicorn as opt in

* recommend setting mem limit for container
2022-10-22 20:00:13 -08:00

24 lines
307 B
Python

import os
import requests
def main():
port = os.getenv("API_PORT")
if port is None:
port = 9000
url = f"http://127.0.0.1:{port}/api/app/about"
r = requests.get(url)
if r.status_code == 200:
exit(0)
else:
exit(1)
if __name__ == "__main__":
main()