services:
# See https://docs.linuxserver.io/images/docker-sabnzbd/
  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd:latest
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/sabnzbd:/config
      - /data/usenet:/data/usenet:rw
    ports:
      - 8080:8080
    restart: unless-stopped

# Downloading Torrents with VPN, see https://github.com/binhex/arch-qbittorrentvpn
  arch-qbittorrentvpn:
    image: binhex/arch-qbittorrentvpn:latest
    container_name: qbittorrentvpn
    volumes:
      - '/docker/appdata/qbitty:/config'
      - '/data/torrents/:/data/torrents'
      - '/etc/localtime:/etc/localtime:ro'
    ports:
      - '49550:49550'
      - '49551:8118'
    environment:
      - VPN_ENABLED=yes
      - VPN_PROV=protonvpn
      - VPN_CLIENT=wireguard
      - VPN_USER=username+pmp
      - VPN_PASS=
      - STRICT_PORT_FORWARD=yes
      - LAN_NETWORK=10.0.0.0/24
      - ENABLE_PRIVOXY=yes
      - PUID=1000
      - PGID=1000
      - WEBUI_PORT=49550
      - UMASK=1000
      - DEBUG=false
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    privileged: true
    network_mode: bridge
    restart: unless-stopped

# See https://github.com/rogerfar/rdt-client
  rdtclient:
    container_name: rdtclient
    volumes:
      - '/data/torrents:/data/torrents'
      - '/docker/appdata/rdt:/data/db'
    image: rogerfar/rdtclient
    restart: always
    logging:
      driver: json-file
      options:
        max-size: 10m
    ports:
      - '6500:6500'

# See https://docs.linuxserver.io/images/docker-bazarr/
  bazarr:
    image: lscr.io/linuxserver/bazarr:latest
    ports:
      - "6767:6767"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/bazarr:/config
      - nas:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

#See https://docs.linuxserver.io/images/docker-lidarr/
  lidarr:
    image: lscr.io/linuxserver/lidarr:latest
    ports:
      - "8686:8686"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/lidarr:/config
      - /data:/data
      - nas:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

# See https://docs.linuxserver.io/images/docker-prowlarr/
  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    ports:
      - "9696:9696"
    volumes:
      - /docker/appdata/prowlarr:/config
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

# See https://docs.linuxserver.io/images/docker-radarr/
  radarr:
    image: lscr.io/linuxserver/radarr:latest
    ports:
      - "7878:7878"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/radarr:/config
      - /data:/data
      - nas:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

# See https://docs.linuxserver.io/images/docker-sonarr/
  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    ports:
      - "8989:8989"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/sonarr:/config
      - /data:/data
      - nas:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  whisparr:
    image: ghcr.io/thespad/whisparr:latest
    ports:
      - "6969:6969"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/whisparr:/config
      - /data:/data
      - /data/media:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

networks:
  default:
    name: arrs
