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

Closed
Claude wants to merge 1 commits from issue/119-chore-switch-health-check-to-lightweight-health-en into main
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"")