chore: switch health check to lightweight /health endpoint (#119)

Closes #119

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-04-09 14:02:17 -05:00
parent 29f9875718
commit 13a948b37b
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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"")