mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-04 15:03:10 -05:00
* 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
24 lines
307 B
Python
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()
|