fix: serve frontend from /app/frontend/dist
This commit is contained in:
parent
849410b937
commit
14704bf23d
1 changed files with 4 additions and 0 deletions
|
|
@ -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("/")
|
||||
|
|
|
|||
Reference in a new issue