Files
Audiolib/docker-compose.yml
Audiolib 6166fd8ab0 FileBrowser: diagnose container mounts + support extra audio path
This is a Docker volume issue, not a code bug. The backend container
only sees paths explicitly mounted in docker-compose.yml. A new mount
on the Linux host (e.g. NAS share, USB drive) is invisible to the
container until added as a volume — restarting the container alone
doesn't help, and restarting just the host doesn't either.

Backend: New GET /api/filebrowser/diagnose endpoint reads
/proc/self/mountinfo and returns the actual bind/nfs/cifs mounts the
container sees, plus a check of common candidate roots (/audiofiles,
/mnt, /media, /srv, /home, /app/data) showing whether they exist and
have content.

Frontend: Info icon in FileBrowser header toggles a diagnose panel
showing mounts and root candidates. Quick-access buttons now built
dynamically from candidate roots that actually exist. On 'path not
found' error: helpful inline explanation including the exact .env
variable and docker-compose command needed to add a new mount.

docker-compose.yml: New EXTRA_AUDIO_PATH env variable. Mounts a
second host path 1:1 (same path inside container, like
AUDIOFILES_PATH does). Defaults to ./data → /extra_audio_unused
when unset, which is a no-op.

.env.example: Documents EXTRA_AUDIO_PATH usage with example.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 21:23:47 +02:00

40 lines
1.0 KiB
YAML

services:
backend:
build: ./backend
container_name: audiolib-backend
restart: unless-stopped
env_file: .env
volumes:
- ./data:/app/data
- ${AUDIOFILES_PATH:-./audiofiles}:${AUDIOFILES_PATH:-/audiofiles}:ro
# Zusätzlicher Pfad (NAS-Share, USB-Platte, weiterer Mount):
# Setze EXTRA_AUDIO_PATH=/host/pfad in .env. Default ist ein No-Op.
- ${EXTRA_AUDIO_PATH:-./data}:${EXTRA_AUDIO_PATH:-/extra_audio_unused}:ro
expose:
- "8000"
depends_on: []
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build: ./frontend
container_name: audiolib-frontend
restart: unless-stopped
expose:
- "80"
nginx:
image: nginx:1.25-alpine
container_name: audiolib-nginx
restart: unless-stopped
ports:
- "${SERVER_PORT:-3000}:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- backend
- frontend