diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..81278aa5 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +DATABASE_URL=./data/zerobyte.db +RESTIC_PASS_FILE=./data/restic.pass +RESTIC_CACHE_DIR=./data/restic/cache +ZEROBYTE_REPOSITORIES_DIR=./data/repositories +ZEROBYTE_VOLUMES_DIR=./data/volumes diff --git a/.gitignore b/.gitignore index e12444f2..c2b6cf20 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ mutagen.yml.lock notes.md smb-password.txt cache.db + +data/ + +.env* +!.env.example +!.env.test diff --git a/README.md b/README.md index c48914ce..094c40c8 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,32 @@ docker compose up -d Once the container is running, you can access the web interface at `http://:4096`. +## Development (no Docker) + +You can run Zerobyte locally during development without Docker: + +```bash +bun install +bun run dev +``` + +For local development, create a `.env.local` file at the repo root and override the Docker paths: + +```bash +# Example +DATABASE_URL=./data/zerobyte.db +RESTIC_PASS_FILE=./data/restic.pass +RESTIC_CACHE_DIR=./data/restic/cache +ZEROBYTE_REPOSITORIES_DIR=./data/repositories +ZEROBYTE_VOLUMES_DIR=./data/volumes +``` + +Notes: + +- Remote mount backends (NFS/SMB/WebDAV/SFTP) rely on Linux mount tooling and `CAP_SYS_ADMIN`; on macOS they are expected to be unavailable. +- To actually run backups/repository checks, install `restic` on your machine (e.g. via Homebrew). If `restic` is not installed, the app still starts but backup operations will fail with a clear error. +- rclone support is detected via `RCLONE_CONFIG` or `~/.config/rclone/rclone.conf`. + ## Configuration Zerobyte can be customized using environment variables. Below are the available options: diff --git a/app/client/components/file-tree.tsx b/app/client/components/file-tree.tsx index 22d0a5c4..ba101598 100644 --- a/app/client/components/file-tree.tsx +++ b/app/client/components/file-tree.tsx @@ -501,6 +501,7 @@ const NodeButton = memo(({ depth, icon, onClick, onMouseEnter, className, childr return (