feat: Docker deployment + Gitea CI/CD workflow

- Multi-stage Dockerfile: Node frontend build → Python wheel build → slim runtime
- Backend serves SvelteKit static output via FastAPI StaticFiles mount
- docker-compose.yml with named volume for /data persistence
- Gitea Actions workflow: build/push Docker image + create release on v* tags
- Add NOTIFY_BRIDGE_STATIC_DIR config for frontend path
- Fix run() to use configurable host/port
This commit is contained in:
2026-03-23 02:14:14 +03:00
parent e0bae394ee
commit 1ac6a17f6f
6 changed files with 188 additions and 1 deletions
@@ -118,6 +118,14 @@ async def health():
return {"status": "ok"}
# --- Serve frontend static files (production) ---
# Must come AFTER all API routes so /api/* takes priority
from pathlib import Path
if _cfg.static_dir and Path(_cfg.static_dir).is_dir():
from fastapi.staticfiles import StaticFiles
app.mount("/", StaticFiles(directory=_cfg.static_dir, html=True), name="frontend")
def run():
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8420)
uvicorn.run(app, host=_cfg.host, port=_cfg.port)