Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring
TypeScript diagramhomelabhomelab-infrastructure-observabilitynetworkproxmox-veself-hostedzigbeezwavezwave-js
fix: ensure data directory exists before SQLite engine init
Pouzor5246770a3a9a
diff --git a/backend/app/db/database.py b/backend/app/db/database.pyindex 579fa8b..dae56ac 100644--- a/backend/app/db/database.py+++ b/backend/app/db/database.py@@ -1,11 +1,15 @@from collections.abc import AsyncGeneratorfrom contextlib import suppress+from pathlib import Pathfrom sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_enginefrom sqlalchemy.orm import DeclarativeBasefrom app.core.config import settings+# Ensure the data directory exists before SQLite tries to open the file+Path(settings.sqlite_path).parent.mkdir(parents=True, exist_ok=True)+engine = create_async_engine(f"sqlite+aiosqlite:///{settings.sqlite_path}",echo=False,diff --git a/backend/data/.gitignore b/backend/data/.gitignorenew file mode 100644index 0000000..ec5328c--- /dev/null+++ b/backend/data/.gitignore@@ -0,0 +1,4 @@+*.db+*.db-shm+*.db-wal+scan_config.json