fix(health): expose health endpoints under /api/v1
Docker Build & Publish / build (push) Successful in 1m15s
Docker Build & Publish / push (push) Failing after 5s
Docker Build & Publish / Prune old image versions (push) Has been skipped

The webui connection ping requests ${apiBase}/health where apiBase is
/api/v1, so it was hitting /api/v1/health — a route that never existed
(health was mounted only at the root). Mount health_router under the v1
aggregator too; root /health stays in main.py for compose/nginx probes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Senko-san
2026-06-10 14:20:00 +03:00
parent 14c1bc16e0
commit 356cd00772
+4
View File
@@ -2,6 +2,7 @@
from fastapi import APIRouter from fastapi import APIRouter
from app.api.health import router as health_router
from app.api.v1.admin import router as admin_router from app.api.v1.admin import router as admin_router
from app.api.v1.albums import router as albums_router from app.api.v1.albums import router as albums_router
from app.api.v1.artists import router as artists_router from app.api.v1.artists import router as artists_router
@@ -22,6 +23,9 @@ from app.api.v1.user_settings import router as user_settings_router
from app.api.v1.users import router as users_router from app.api.v1.users import router as users_router
api_v1_router = APIRouter(prefix="/api/v1") api_v1_router = APIRouter(prefix="/api/v1")
# Also expose health under /api/v1 (root /health stays in main.py for compose/nginx
# probes); the webui pings ${apiBase}/health and apiBase is /api/v1.
api_v1_router.include_router(health_router)
api_v1_router.include_router(auth_router) api_v1_router.include_router(auth_router)
api_v1_router.include_router(users_router) api_v1_router.include_router(users_router)
api_v1_router.include_router(tracks_router) api_v1_router.include_router(tracks_router)