From 46550c77c7a7cd163233606ecd05068e01d8e562 Mon Sep 17 00:00:00 2001 From: James Lance Date: Sat, 11 Apr 2026 00:36:49 +0000 Subject: [PATCH 1/4] feat: add Kometa for automated Plex collection management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Kometa (kometateam/kometa) service with Traefik/Authelia routing at kometa.$DOMAINNAME - Add kometa_config NFS volume (Synology:/volume1/docker/kometa) - Add kometa/config.yml.example with full defaults suite (franchise, genre, decade, studio, director, seasonal, IMDb, TMDb) - Add PLEX_TOKEN to env.example (required for Kometa → Plex auth) - Add "kometa" to validate-traefik.sh SERVICES array Radarr collections enabled via UI: Settings → UI → Show Collections. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 35 +++++++++++++++++++++++++++++++++++ env.example | 2 ++ kometa/config.yml.example | 31 +++++++++++++++++++++++++++++++ scripts/validate-traefik.sh | 1 + 4 files changed, 69 insertions(+) create mode 100644 kometa/config.yml.example diff --git a/docker-compose.yml b/docker-compose.yml index a5ef2bd..4be04d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -136,6 +136,12 @@ volumes: type: nfs o: addr=192.168.0.6,rw,nfsvers=4.1,async device: :/volume1/downloads + kometa_config: + driver: local + driver_opts: + type: nfs + o: addr=192.168.0.6,rw,nfsvers=4.1,async + device: :/volume1/docker/kometa ########################### SERVICES services: @@ -811,3 +817,32 @@ services: ## HTTP Services - "traefik.http.routers.librespeed-rtr.service=librespeed-svc" - "traefik.http.services.librespeed-svc.loadbalancer.server.port=80" + + # Kometa - Plex Collection Manager + kometa: + container_name: kometa + image: kometateam/kometa:latest + restart: unless-stopped + security_opt: + - no-new-privileges:true + networks: + - t2_proxy + volumes: + - kometa_config:/config + environment: + - PUID=$PUID + - PGID=$PGID + - TZ=$TZ + - KOMETA_TIMES=05:00 + logging: *default-logging + labels: + - "traefik.enable=true" + ## HTTP Routers + - "traefik.http.routers.kometa-rtr.entrypoints=https" + - "traefik.http.routers.kometa-rtr.rule=Host(`kometa.$DOMAINNAME`)" + - "traefik.http.routers.kometa-rtr.tls=true" + ## Middlewares + - "traefik.http.routers.kometa-rtr.middlewares=chain-authelia@file" + ## HTTP Services + - "traefik.http.routers.kometa-rtr.service=kometa-svc" + - "traefik.http.services.kometa-svc.loadbalancer.server.port=4000" diff --git a/env.example b/env.example index d1fa37b..fa71326 100755 --- a/env.example +++ b/env.example @@ -17,3 +17,5 @@ CLOUDFLARE_API_KEY= CLOUDFLARE_ZONEID= PIHOLE_PWD= + +PLEX_TOKEN= diff --git a/kometa/config.yml.example b/kometa/config.yml.example new file mode 100644 index 0000000..8e78469 --- /dev/null +++ b/kometa/config.yml.example @@ -0,0 +1,31 @@ +## Kometa Configuration +## Copy to /mnt/docker/kometa/config.yml and fill in your Plex token. +## Retrieve token: Plex Web → Account → Account Settings → Plex Web Preferences → X-Plex-Token + +plex: + url: http://plex:32400 + token: YOUR_PLEX_TOKEN_HERE + +libraries: + Movies: + collection_files: + - default: basic # Popular, Trending, etc. + - default: imdb # IMDb Top 250, Most Popular, etc. + - default: tmdb # TMDb Popular, Top Rated + - default: franchise # Movie franchises (James Bond, MCU, etc.) + - default: universe # Cinematic universes (Marvel, DC, etc.) + - default: decade # 1980s, 1990s, 2000s, etc. + - default: genre # Action, Comedy, Drama, etc. + - default: studio # Warner Bros, Universal, etc. + - default: director # Notable directors + - default: seasonal # Holiday/seasonal collections + +settings: + cache: true + cache_expiration: 60 + asset_directory: /config/assets + run_order: + - collections + - metadata + - overlays + - operations diff --git a/scripts/validate-traefik.sh b/scripts/validate-traefik.sh index 9f96095..9550760 100755 --- a/scripts/validate-traefik.sh +++ b/scripts/validate-traefik.sh @@ -78,6 +78,7 @@ SERVICES=( "speedtest" # LibreSpeed "homebridge" "home" # DSM (Synology) + "kometa" ) # Function to print test result From a66b6d4cb5295dcc14813f5fbd530c4afc16c01c Mon Sep 17 00:00:00 2001 From: James Lance Date: Sat, 11 Apr 2026 01:01:30 +0000 Subject: [PATCH 2/4] fix: read Plex token from environment in Kometa Pass PLEX_TOKEN env var into the Kometa container and use Kometa's <> interpolation in config.yml instead of hardcoding the token value. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 1 + kometa/config.yml.example | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4be04d6..77d6370 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -834,6 +834,7 @@ services: - PGID=$PGID - TZ=$TZ - KOMETA_TIMES=05:00 + - PLEX_TOKEN=$PLEX_TOKEN logging: *default-logging labels: - "traefik.enable=true" diff --git a/kometa/config.yml.example b/kometa/config.yml.example index 8e78469..23408bc 100644 --- a/kometa/config.yml.example +++ b/kometa/config.yml.example @@ -4,7 +4,7 @@ plex: url: http://plex:32400 - token: YOUR_PLEX_TOKEN_HERE + token: <> libraries: Movies: From 20271ad0677252e517d3f5fe2d75b38a585edcbc Mon Sep 17 00:00:00 2001 From: James Lance Date: Sat, 11 Apr 2026 01:14:11 +0000 Subject: [PATCH 3/4] feat: add TMDb API token to Kometa config Pass TMDB_API_READ_ACCESS_TOKEN into Kometa container and wire it into config.yml via <> interpolation. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 1 + env.example | 1 + kometa/config.yml.example | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 77d6370..50bebdb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -835,6 +835,7 @@ services: - TZ=$TZ - KOMETA_TIMES=05:00 - PLEX_TOKEN=$PLEX_TOKEN + - TMDB_API_READ_ACCESS_TOKEN=$TMDB_API_READ_ACCESS_TOKEN logging: *default-logging labels: - "traefik.enable=true" diff --git a/env.example b/env.example index fa71326..8bb058e 100755 --- a/env.example +++ b/env.example @@ -19,3 +19,4 @@ CLOUDFLARE_ZONEID= PIHOLE_PWD= PLEX_TOKEN= +TMDB_API_READ_ACCESS_TOKEN= diff --git a/kometa/config.yml.example b/kometa/config.yml.example index 23408bc..35a5287 100644 --- a/kometa/config.yml.example +++ b/kometa/config.yml.example @@ -6,6 +6,11 @@ plex: url: http://plex:32400 token: <> +tmdb: + apikey: <> + language: en + region: US + libraries: Movies: collection_files: From 22e22ead981bc9324ded667991c3ea0f0f435f16 Mon Sep 17 00:00:00 2001 From: James Lance Date: Sat, 11 Apr 2026 01:15:33 +0000 Subject: [PATCH 4/4] chore: change Kometa run time to 1 AM Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50bebdb..ba20419 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -833,7 +833,7 @@ services: - PUID=$PUID - PGID=$PGID - TZ=$TZ - - KOMETA_TIMES=05:00 + - KOMETA_TIMES=01:00 - PLEX_TOKEN=$PLEX_TOKEN - TMDB_API_READ_ACCESS_TOKEN=$TMDB_API_READ_ACCESS_TOKEN logging: *default-logging