fix: serve frontend from /app/frontend/dist

This commit is contained in:
Zac Gaetano 2026-04-05 10:56:31 -04:00
parent 849410b937
commit 14704bf23d

View file

@ -987,9 +987,13 @@ async def remove_mcp_server(name: str):
# -------- Static files / React SPA --------
# Try multiple possible frontend build output locations
STATIC_DIR = Path("/app/static")
if not STATIC_DIR.exists():
STATIC_DIR = Path("/app/frontend/dist")
if STATIC_DIR.exists():
app.mount("/static", StaticFiles(directory=str(STATIC_DIR)), name="static")
app.mount("/assets", StaticFiles(directory=str(STATIC_DIR / "assets")), name="assets") if (STATIC_DIR / "assets").exists() else None
@app.get("/")