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:
parent
29f9875718
commit
13a948b37b
@ -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
|
||||
|
||||
@ -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"")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user