# Tdarr Node - Guava (TrueNAS Scale with AMD Ryzen 8600G)
# Hardware: AMD Ryzen 5 8600G (12 threads) + Radeon 760M (VAAPI capable)
# Connects to Tdarr Server on Synology (atlantis) at 192.168.0.200
#
# NFS Mounts required:
#   /mnt/atlantis_media -> 192.168.0.200:/volume1/data/media   (REQUIRED — source files)
#   /mnt/atlantis_cache -> local ZFS dataset (307 work dirs, no NFS needed)
#
# Persistent mount via TrueNAS init script (POSTINIT, id=1):
#   mount -t nfs 192.168.0.200:/volume1/data/media /mnt/atlantis_media
#
# Manual mount (if lost after reboot):
#   sudo mount -t nfs 192.168.0.200:/volume1/data/media /mnt/atlantis_media
#
# Without this mount /media is empty and all transcodes fail with ENOENT in the
# FFmpeg step. The container must be restarted after mounting to pick up the path.

services:
  tdarr-node:
    image: ghcr.io/haveagitgat/tdarr_node@sha256:dc23becc667f77d2489b1042REDACTED_GITEA_TOKEN  # v2.67.01 - pinned to match server
    container_name: tdarr-node-guava
    labels:
      - com.centurylinklabs.watchtower.enable=false  # Disabled — tdarr nodes must stay version-synced with server
    environment:
      - PUID=1029
      - PGID=100
      - TZ=America/Los_Angeles
      - UMASK=022
      - nodeName=Guava
      - serverIP=192.168.0.200
      - serverPort=8266
      - inContainer=true
      - ffmpegVersion=6
    devices:
      - /dev/dri:/dev/dri  # AMD VAAPI hardware acceleration
    volumes:
      - /mnt/data/tdarr-node/configs:/app/configs
      - /mnt/data/tdarr-node/logs:/app/logs
      - /mnt/atlantis_media:/media
      - /mnt/atlantis_cache:/temp
      - /mnt/atlantis_cache:/cache
    restart: unless-stopped
