From 13a948b37b98c12c8a8fdd6e1ad97b79a9995c4a Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 9 Apr 2026 14:02:17 -0500 Subject: [PATCH] chore: switch health check to lightweight /health endpoint (#119) Closes #119 Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 2 +- app/main.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1e0ccb5..23ea03b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN mkdir -p /usr/src/app/storage # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ - CMD curl -f http://localhost:80/api/v3/current || exit 1 + CMD curl -f http://localhost:80/health || exit 1 # Start uvicorn ENV WEB_WORKERS=2 diff --git a/app/main.py b/app/main.py index dd23244..887f463 100644 --- a/app/main.py +++ b/app/main.py @@ -97,6 +97,11 @@ async def db_connection_middleware(request: Request, call_next): db.close() +@app.get("/health", include_in_schema=False) +async def health(): + return {"status": "ok"} + + @app.middleware("http") async def strip_empty_query_params(request: Request, call_next): qs = request.scope.get("query_string", b"")