diff --git a/.env.example b/.env.example index 3db3a4c..77d6bee 100644 --- a/.env.example +++ b/.env.example @@ -7,4 +7,13 @@ MEILI_KEY=${MEILI_MASTER_KEY} # OpenWebUI integration OPENWEBUI_URL=http://host.docker.internal:3003 OPENWEBUI_API_KEY=put_your_openwebui_api_key_here -OPENWEBUI_KB_NAME=Homelab Library \ No newline at end of file +OPENWEBUI_KB_NAME=Homelab Library + +# Docker volumes paths +LIBRARY_HOST_DIR=/mnt/nfs/library +TRANSCRIPTS_HOST_DIR=/mnt/nfs/transcripts +# leave others as-is or customize: +# TMP_HOST_DIR=./tmp +# MODELS_HOST_DIR=./models +# MEILI_DATA_HOST_DIR=./data/meili +# REDIS_DATA_HOST_DIR=./data/redis \ No newline at end of file diff --git a/README.md b/README.md index 281b52f..2486ec2 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ MEILI_URL=http://localhost:7700 MEILI_KEY=$MEILI_MASTER_KEY ./ingest/ingest_kiwi - Reads `.env` for `OPENWEBUI_URL`, `OPENWEBUI_API_KEY`, `OPENWEBUI_KB_NAME`. - Uploads `*.txt`, `*.md`, `*.html` it finds in `./transcripts` and `./library/web` by default. +## Difference between `library` and `transcripts` folders + +The **library** folder contains the downloaded source media such as videos, podcasts, web snapshots, and other original files. This folder is the one you can mount to Plex or other media managers to access and play your media content. + +The **transcripts** folder, on the other hand, contains processed text data including transcripts, subtitles, and JSON metadata. This folder is mainly used for search and ingestion into OpenWebUI and usually does not need to be mounted in Plex or other media players. ## Generating required secrets diff --git a/docker-compose.yml b/docker-compose.yml index 1f01224..fdf95cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,10 +13,10 @@ services: WHISPER_MODEL: large-v3 WHISPER_PRECISION: int8 volumes: - - ./library:/library - - ./transcripts:/transcripts - - ./tmp:/tmpdl - - ./models:/root/.cache/huggingface + - ${LIBRARY_HOST_DIR:-./library}:/library + - ${TRANSCRIPTS_HOST_DIR:-./transcripts}:/transcripts + - ${TMP_HOST_DIR:-./tmp}:/tmpdl + - ${MODELS_HOST_DIR:-./models}:/root/.cache/huggingface ports: ["8088:8080"] depends_on: [podx-worker, meili, redis] restart: unless-stopped @@ -37,10 +37,10 @@ services: WHISPER_MODEL: large-v3 WHISPER_PRECISION: int8 volumes: - - ./library:/library - - ./transcripts:/transcripts - - ./tmp:/tmpdl - - ./models:/root/.cache/huggingface + - ${LIBRARY_HOST_DIR:-./library}:/library + - ${TRANSCRIPTS_HOST_DIR:-./transcripts}:/transcripts + - ${TMP_HOST_DIR:-./tmp}:/tmpdl + - ${MODELS_HOST_DIR:-./models}:/root/.cache/huggingface depends_on: [meili, redis] restart: unless-stopped extra_hosts: @@ -54,12 +54,12 @@ services: MEILI_NO_ANALYTICS: "true" ports: ["7700:7700"] volumes: - - ./data/meili:/meili_data + - ${MEILI_DATA_HOST_DIR:-./data/meili}:/meili_data restart: unless-stopped redis: image: redis:7-alpine container_name: redis volumes: - - ./data/redis:/data + - ${REDIS_DATA_HOST_DIR:-./data/redis}:/data restart: unless-stopped