diff --git a/README.md b/README.md index d157360..6d32068 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,55 @@ podman run -p 8000:8000 \ Please refer to the official Podman docs for [mounting external volumes](https://docs.podman.io/en/latest/markdown/podman-run.1.html#mounting-external-volumes) and [user namespace mode](https://https://docs.podman.io/en/latest/markdown/podman-run.1.html#userns-mode) for more information. +## Switching databases at runtime + +The **DB** menu in the sidebar lets you switch the active database without restarting the server. Three modes are supported: + +- **File-based** — open a database file on the local filesystem +- **In-memory** — temporary database; all data is lost on restart +- **Remote (SSH)** — mount a database from a remote machine over SSH + +### Remote (SSH) mode + +SSH mode uses `sshfs` to mount the remote directory on the machine running Ladybug Explorer and opens the database from the mount point directly. Changes are written through to the remote machine in real time. + +**Requirements on the machine running Ladybug Explorer:** + +*Linux* + +| Dependency | Required when | How to install | +|---|---|---| +| `sshfs` | Always for SSH mode | `sudo apt install sshfs` or `sudo dnf install fuse-sshfs` | +| `/dev/fuse` | Always for SSH mode | Kernel FUSE module — present by default on most distributions | +| `sshpass` | Password auth only | `sudo apt install sshpass` or `sudo dnf install sshpass` | + +*macOS* + +macOS does not include FUSE support by default. Install [macFUSE](https://osxfuse.github.io/) first, then allow its kernel extension in **System Settings → Privacy & Security** (a reboot may be required). On Apple Silicon, disabling SIP may additionally be needed — see the [macFUSE FAQ](https://github.com/osxfuse/osxfuse/wiki/FAQ). + +```bash +brew install --cask macfuse +brew install gromgit/fuse/sshfs-mac # sshfs +brew install hudochenkov/sshpass/sshpass # only needed for password auth +``` + +Private key authentication does not require `sshpass` on any platform. + +**Requirements on the remote machine:** + +Only an SSH daemon (`sshd`) is needed. No additional software is required. + +**When running via Docker**, grant the container access to FUSE: + +```bash +docker run -p 8000:8000 \ + --cap-add SYS_ADMIN \ + --device /dev/fuse \ + --rm lbugdb/explorer:latest +``` + +`sshfs` and (if using password auth) `sshpass` must also be present inside the container image. + ## Documentation For more information regarding launching and using Ladybug Explorer, please refer to the [documentation](https://docs.ladybugdb.com/visualization/lbug-explorer/). diff --git a/src/components/DBView/DBConfigModal.vue b/src/components/DBView/DBConfigModal.vue new file mode 100644 index 0000000..1de5832 --- /dev/null +++ b/src/components/DBView/DBConfigModal.vue @@ -0,0 +1,515 @@ + + + + + diff --git a/src/components/MainLayout.vue b/src/components/MainLayout.vue index 37d390a..83618d1 100644 --- a/src/components/MainLayout.vue +++ b/src/components/MainLayout.vue @@ -57,6 +57,19 @@
+