diff --git a/README.md b/README.md index 051c0e7..3ea3b45 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ docker compose -f docker-compose.dev.yml up --build ``` Frontend runs on http://localhost:5173 and the backend on http://localhost:8000. +The backend media index is persisted in a Docker volume (`backend_cache`) so rebuilds and container restarts do not force a full re-index. ### Manual backend/frontend development diff --git a/backend/README.md b/backend/README.md index 446a4a6..99c32fe 100644 --- a/backend/README.md +++ b/backend/README.md @@ -100,6 +100,7 @@ API docs available at: http://localhost:8000/docs ## Docker The repository root includes a production `docker-compose.yml` and a development `docker-compose.dev.yml`. +The backend media index is stored in the `backend_cache` Docker volume so it survives container restarts and image rebuilds. ## API Endpoints diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 74573b0..2357279 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -16,6 +16,7 @@ services: volumes: - ./backend:/app/backend - ${SSH_KEY_HOST_DIR}:/root/.ssh:ro + - backend_cache:/app/backend/.cache restart: unless-stopped frontend: @@ -39,3 +40,4 @@ services: volumes: frontend_node_modules: + backend_cache: diff --git a/docker-compose.yml b/docker-compose.yml index fc8a063..1f9c427 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: SSH_KEY_NAME: ${SSH_KEY_NAME} volumes: - ${SSH_KEY_HOST_DIR}:/root/.ssh:ro + - backend_cache:/app/backend/.cache restart: unless-stopped networks: - web @@ -64,6 +65,9 @@ services: - "8080:80" restart: unless-stopped +volumes: + backend_cache: + networks: web: external: true diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 631758e..a0f2abc 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -128,6 +128,7 @@ Phase 1: Jellyfin media index, SSH-based remote filesystem inspection, server mo - Provide Docker Compose deployment files at the repository root for production and local development. - Backend Docker deployment should mount a private SSH key and a known_hosts file into the container rather than baking them into the image. - Production compose should also pass the root `.env` into the backend container so runtime auth settings like `OIDC_ISSUER_URL` are available there, not just at compose interpolation time. +- The backend media index should persist in a Docker volume so a container restart or image rebuild does not force a new full index build. - The SSH key configuration should support separate directory/name inputs so Docker Compose can mount an arbitrary host SSH directory into `/root/.ssh` while the app assembles the full key path. - Show Jellyfin media counts for movies, series, and series episodes on the dashboard. - Show dashboard session activity from Jellyfin, including both currently playing sessions and logged-in idle sessions.