version: "3.2"
services:
  qbittorrent:
    container_name: qBittorrent
    environment:
      - TZ=Asia/Shanghai
      - TemPath=/downloads
      - SavePath=/downloads
      - PGID=${GID}
      - PUID=${UID}
      - WEBUI_PORT=${QB_PORT}
    volumes:
      - qb_config:/config
      - ${DOWNLOAD_PATH}:/downloads # 填入下载绝对路径
    ports:
      - ${QB_PORT}:${QB_PORT}
      - "6881:6881"
      - "6881:6881/udp"
    networks:
      - auto_bangumi
    restart: unless-stopped
    image: superng6/qbittorrent

  auto_bangumi:
    container_name: AutoBangumi
    environment:
      - TZ=Asia/Shanghai
      - PGID=${GID}
      - PUID=${UID}
      - AB_DOWNLOADER_HOST=qbittorrent:${QB_PORT}
    volumes:
      - ./config:/app/config
      - ./data:/app/data
    networks:
      - auto_bangumi
    ports:
      - '7892:7892'
    dns:
      - 8.8.8.8
      - 223.5.5.5
    restart: unless-stopped
    image: estrellaxd/auto_bangumi:latest
    depends_on:
      - qbittorrent

networks:
  auto_bangumi:
volumes:
  qb_config:
    external: false
