From cfa3460605292ec18bf23488994822d4356b93dd Mon Sep 17 00:00:00 2001 From: MSWS Date: Thu, 2 Oct 2025 22:05:38 -0700 Subject: [PATCH] feat: Refactor services: add Companion, disable personal watchtower instance ``` - Add new track "5 Seconds of Summer - Social Casualty" to Daily playlist. - Disable personal watchtower service by commenting out its configuration in `watchtower/compose.yml`. - Replace `inv_sig_helper` service with `companion` service in `invidious/compose.yml`, introducing new configurations, networks, and volumes to support the change. - Update `invidious` service configuration for integration with the `companion` service, including adding new environment variables and modifying network and volume references. - Enhance security settings in `invidious/compose.yml` by updating `security_opt`, `cap_drop`, and maintaining `read_only` configuration for the `companion` service. ``` --- invidious/compose.yml | 35 +++++++++++++++-------- navidrome/music/playlists/Daily Music.m3u | 2 ++ watchtower/compose.yml | 18 ++++++------ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/invidious/compose.yml b/invidious/compose.yml index dadcc38..2f0cffd 100644 --- a/invidious/compose.yml +++ b/invidious/compose.yml @@ -18,12 +18,11 @@ services: external_port: 443 domain: yt.msws.xyz https_only: true - # statistics_enabled: true - signature_server: inv_sig_helper:12999 - visitor_data: ${VISITOR_DATA} po_token: ${PO_TOKEN} - # external_port: hmac_key: ${HMAC_KEY} + invidious_companion: + - private_url: "http://invidious-companion-1:8282/companion" + invidious_companion_key: ${COMPANION_KEY} healthcheck: test: wget -nv --tries=1 --spider http://invidious:3000/api/v1/trending || exit 1 interval: 30s @@ -36,24 +35,35 @@ services: depends_on: - invidious-db networks: - - sig-helper + - companion - invidious-db - cloudflared - inv_sig_helper: - # image: quay.io/invidious/inv-sig-helper:latest - image: inv_sig_helper:local - command: ["--tcp", "0.0.0.0:12999"] + companion: + image: quay.io/invidious/invidious-companion:latest environment: - - RUST_LOG=info + # Use the key generated in the 2nd step + - SERVER_SECRET_KEY=${COMPANION_KEY} restart: unless-stopped + # Uncomment only if you have configured "public_url" for Invidious companion + # Or if you want to use Invidious companion as an API in your program. + # Remove "127.0.0.1:" if used from an external IP + #ports: + # - "127.0.0.1:8282:8282" + logging: + options: + max-size: "1G" + max-file: "4" cap_drop: - ALL read_only: true + # cache for youtube library + volumes: + - companioncache:/var/tmp/youtubei.js:rw security_opt: - no-new-privileges:true networks: - - sig-helper + - companion invidious-db: image: docker.io/library/postgres:14 @@ -74,9 +84,10 @@ services: volumes: postgresdata: + companioncache: networks: invidious-db: - sig-helper: + companion: cloudflared: external: true diff --git a/navidrome/music/playlists/Daily Music.m3u b/navidrome/music/playlists/Daily Music.m3u index baa9d99..685e7d5 100644 --- a/navidrome/music/playlists/Daily Music.m3u +++ b/navidrome/music/playlists/Daily Music.m3u @@ -1,5 +1,7 @@ #EXTM3U #PLAYLIST:Daily Music +#EXTINF:181,5 Seconds of Summer - Social Casualty +/music/5 Seconds of Summer/13 - Social Casualty.mp3 #EXTINF:190,Maroon 5 - Memories /music/Maroon 5/11 - Memories .mp3 #EXTINF:196,Tom Walker - Head Underwater diff --git a/watchtower/compose.yml b/watchtower/compose.yml index 4a2d1e0..2a54902 100644 --- a/watchtower/compose.yml +++ b/watchtower/compose.yml @@ -7,12 +7,12 @@ services: - /var/run/docker.sock:/var/run/docker.sock environment: WATCHTOWER_SCHEDULE: "0 0 18 * * *" - watchtower-kboaz: - image: containrrr/watchtower - restart: always - container_name: watchtower-kboaz - volumes: - - /var/run/docker.sock:/var/run/docker.sock - environment: - WATCHTOWER_SCHEDULE: "0 * * * * *" - command: "kboaz-site-1" + # watchtower-kboaz: + # image: containrrr/watchtower + # restart: always + # container_name: watchtower-kboaz + # volumes: + # - /var/run/docker.sock:/var/run/docker.sock + # environment: + # WATCHTOWER_SCHEDULE: "0 * * * * *" + # command: "kboaz-site-1"