---
services:
  bazarr:
    image: ghcr.io/linuxserver/bazarr@sha256:5805d6a44689a41cf78a8317208276a52f0647fb3cd0b2c4a3c8df6e02f93d3b
    container_name: bazarr
    ports:
      - "6767:6767"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/bazarr:/config
      - /data/media:/data/media
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  lidarr:
    image: ghcr.io/linuxserver/lidarr@sha256:5c1f7a05944a1ceea242481801bbc5f908a4cc66e95ae0153b5a59f2d6224b17
    container_name: lidarr
    ports:
      - "8686:8686"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/lidarr:/config
      - /data:/data
      - /docker/appdata/lidarr-extended:/custom-services.d
      - /docker/appdata/lidarr-extended1:/custom-cont-init.d
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  prowlarr:
    image: ghcr.io/linuxserver/prowlarr@sha256:2ae64259bfca88972deec4cffa3750a454224283515854408e35af480f167cd7
    container_name: prowlarr
    ports:
      - "9696:9696"
    volumes:
      - /docker/appdata/prowlarr:/config
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  radarr:
    image: ghcr.io/linuxserver/radarr@sha256:2e37ae0af799e01f413a97ee82c7e581a5b635816df0380889bc65d554dbeb17
    container_name: radarr
    ports:
      - "7878:7878"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/radarr:/config
      - /data:/data
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  sonarr:
    image: ghcr.io/linuxserver/sonarr@sha256:f1b771bf5f911ddb11aa86170ae27fab5ccde7d4671edcde6a3b264af8662945
    container_name: sonarr
    ports:
      - "8989:8989"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/sonarr:/config
      - /data:/data
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000

  homarr:
    container_name: homarr
    image: ghcr.io/ajnart/homarr:0.15.7
    restart: unless-stopped
    volumes:
      - /docker/appdata/homarr/configs:/app/data/configs
      - /docker/appdata/homarr/icons:/app/public/icons
      - /docker/appdata/homarr/data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - '7575:7575'
    environment:
      - AUTH_PROVIDER=oidc
      - AUTH_OIDC_URI=${AUTH_OIDC_URI}
      - AUTH_OIDC_CLIENT_SECRET=${AUTH_OIDC_CLIENT_SECRET}
      - AUTH_OIDC_CLIENT_ID=${AUTH_OIDC_CLIENT_ID}
      - AUTH_OIDC_CLIENT_NAME=authentik
      - BASE_URL=${BASE_URL}
      - NEXTAUTH_URL=${NEXTAUTH_URL}
      - AUTH_OIDC_ADMIN_GROUP=${AUTH_OIDC_ADMIN_GROUP}


  doplarr:
    image: ghcr.io/linuxserver/doplarr@sha256:8eb5d126bb653bff501d4ecfe99a8a0f6fb58c6ee989bca658667994b125f134
    container_name: doplarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=${TZ}
      - DISCORD__TOKEN=${DISCORD__TOKEN}
      - RADARR__API=${RADARR__API}
      - RADARR__URL=${RADARR__URL}
      - SONARR__API=${SONARR__API}
      - SONARR__URL=${SONARR__URL}
      - DISCORD__MAX_RESULTS=${DISCORD__MAX_RESULTS}
      - DISCORD__REQUESTED_MSG_STYLE=${DISCORD__REQUESTED_MSG_STYLE}
      - SONARR__QUALITY_PROFILE=${SONARR__QUALITY_PROFILE}
      - RADARR__QUALITY_PROFILE=${RADARR__QUALITY_PROFILE}
      - SONARR__ROOTFOLDER=${SONARR__ROOTFOLDER}
      - RADARR__ROOTFOLDER=${RADARR__ROOTFOLDER}
      - PARTIAL_SEASONS=${PARTIAL_SEASONS}
      - LOG_LEVEL=${LOG_LEVEL}
      - JAVA_OPTS=${JAVA_OPTS}
    volumes:
      - /docker/appdata/doplarr/config:/config
    restart: unless-stopped

  syncthing:
    image: ghcr.io/linuxserver/syncthing@sha256:34edd556aaada725855f256b30fd94751ef4bdb45ddd6434c5f1dcaca8531747
    container_name: syncthing
    hostname: ARRS
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /docker/appdata/syncthing/config:/config
      - /docker/appdata/:/docker/appdata/
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

  ## Should move this to Ubu
  code-server:
    image: ghcr.io/linuxserver/code-server@sha256:8aad72189f12112a0a4432b1a8d75437231479501fc808e9d090f527c4c888bd
    container_name: code-server
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - SUDO_PASSWORD=$SUDO_PASSWORD
      - PROXY_DOMAIN=$PROXY_DOMAIN
    volumes:
      - /docker/appdata/code-server/config:/config
    ports:
      - 8443:8443
    restart: unless-stopped
  ## Downloaders
  sabnzbd:
    image: ghcr.io/linuxserver/sabnzbd@sha256:1d31c01bb765cfbbe916b418b336223b07541e50065e6b4284f5ffb8ea452d12
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/sab:/config
      - /data/usenet:/data/usenet:rw
    ports:
      - 8080:8080
    restart: unless-stopped

  arch-qbittorrentvpn:
    image: binhex/arch-qbittorrentvpn:4.6.5-1-03
    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=mafyuh+pmp
      - VPN_PASS=
      - STRICT_PORT_FORWARD=yes
      - LAN_NETWORK=$LAN_NETWORK
      - 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

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:v3.3.21
    container_name: flaresolverr
    ports:
      - '8191:8191'
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped

networks:
  default:
    name: arrs_default