#!/bin/sh # Healthcheck: probe the FastAPI /health endpoint set -e PORT="${PORT:-8087}" python -c " import urllib.request, sys try: r = urllib.request.urlopen('http://localhost:${PORT}/health', timeout=5) sys.exit(0 if r.status == 200 else 1) except Exception: sys.exit(1) "