networks:
  dns_net:
    driver: bridge
    ipam:
        config:
        - subnet: 172.20.0.0/16
services:
  qbittorrent-nox:
    # for debugging
    #cap_add:
      #- SYS_PTRACE
    container_name: qbittorrent-nox
    environment:
      #- PAGID=10000
      #- PGID=1000
      #- PUID=1000
      - QBT_EULA=accept
      - QBT_VERSION=latest
      - QBT_WEBUI_PORT=8080
      #- TZ=UTC
      #- UMASK=022
    image: qbittorrentofficial/qbittorrent-nox:latest
    ports:
      # for bittorrent traffic
      - 6881:6881/tcp
      - 6881:6881/udp
      # for WebUI
      - 8080:8080/tcp
    read_only: true
    stop_grace_period: 30m
    tmpfs:
      - /tmp
    tty: true
    volumes:
      - /home/guts/docker:/config
      - /media/network/Torrents:/downloads
      - /home/guts/VueTorrent:/VueTorrent
  jackett:
    image: lscr.io/linuxserver/jackett:latest
    container_name: jackett
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - AUTO_UPDATE=true #optional
      - RUN_OPTS= #optional
    volumes:
      - /home/guts/docker:/config
      - /media/Torrents:/downloads
    ports:
      - 9117:9117
    restart: always
    
  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: alexfozor/flaresolverr:pr-1300-experimental
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=America/Santo_Domingo
    ports:
      - "${PORT:-8191}:8191"
    restart: unless-stopped
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    networks:
      dns_net:
        ipv4_address: 172.20.0.6
    ports:
      # DNS Ports
      - "53:53/tcp"
      - "53:53/udp"
      # Default HTTP Port
      - "6345:80/tcp"
      # Default HTTPs Port. FTL will generate a self-signed certificate
      - "6346:443/tcp"
      # Uncomment the below if using Pi-hole as your DHCP Server
      #- "67:67/udp"
    environment:
      # Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
      TZ: 'America/Santo_Domingo'
      # Set a password to access the web interface. Not setting one will result in a random password being assigned
      FTLCONF_webserver_api_password: ${FTLCONF_webserver_api_password} 
      PIHOLE_DNS_: '172.20.0.7#5335'
      CUSTOM_CACHE_SIZE: 0
    # Volumes store your data between container upgrades
    volumes:
      # For persisting Pi-hole's databases and common configuration file
      - '/home/guts/docker/pihole:/etc/pihole'
      
      # Uncomment the below if you have custom dnsmasq config files that you want to persist. Not needed for most starting fresh with Pi-hole v6. If you're upgrading from v5 you and have used this directory before, you should keep it enabled for the first v6 container start to allow for a complete migration. It can be removed afterwards
      - '/home/guts/docker/dnsmasq.d:/etc/dnsmasq.d'
    cap_add:
      # See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
      # Required if you are using Pi-hole as your DHCP server, else not needed
      - NET_ADMIN
    restart: always
  unbound:
    container_name: unbound
    image: madnuttah/unbound:latest
    hostname: unbound
    networks:
      dns_net:
        ipv4_address: 172.20.0.7
    environment:
      - TZ=America/Santo_Domingo
      - ServerIP=172.20.0.7
      - UNBOUND_UID=1000 #Example only, check your docker user info
      - UNBOUND_GID=1000
    volumes:
      - /home/guts/docker/unbound/conf.d:/usr/local/unbound/conf.d/:rw
      - /home/guts/docker/unbound/unbound.conf:/usr/local/unbound/unbound.conf:rw
      - /home/guts/docker/unbound/log.d/unbound.log:/usr/local/unbound/log.d/unbound.log:rw
      - /home/guts/docker/unbound/zones.d:/usr/local/unbound/zones.d/:rw
      - /home/guts/docker/unbound/iana.d:/usr/local/unbound/iana.d/:rw
    ports:
      - "5335:5335/tcp"
      - "5335:5335/udp"
    restart: unless-stopped
  homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    ports:
      - 3000:3000
    volumes:
      - /home/guts/docker/homepage:/app/config # Make sure your local config directory exists
      - /home/guts/Pictures/homepage:/app/public/images
      - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations
    environment:
      HOMEPAGE_ALLOWED_HOSTS: 10.0.0.121:3000
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - /media/network/YouTube:/downloads
  speedtest-tracker:
    image: lscr.io/linuxserver/speedtest-tracker:latest
    restart: unless-stopped
    container_name: speedtest-tracker
    ports:
      - 9080:80
      - 9443:443
    environment:
      - PUID=1000
      - PGID=1000
      - APP_KEY=${APP_KEY_SPEEDTEST}
      - DB_CONNECTION=sqlite
      - SPEEDTEST_SCHEDULE=6 */2 * * *
      - SPEEDTEST_SERVERS=26513
    volumes:
            - /home/guts/docker/speedtest-tracker:/config
