自定义Nas解决方案

为了方便Nas玩家更好的进行自动化资源下载,特意实现Aria2扩展服务,便于自动订阅并下载想要的资源。

Aria2官方地址:https://aria2.github.io/
Aria2源码地址:https://github.com/aria2/aria2
Aria2镜像源码地址:https://github.com/P3TERX/Aria2-Pro-Docker
Aria2镜像仓库地址:https://hub.docker.com/r/p3terx/aria2-pro

Aria2-Ext作者地址:https://blog.cikaros.top/
Aria2-Ext源码地址:https://github.com/Cikaros/aria2-ext
Aria2-Ext镜像仓库地址:https://hub.docker.com/r/cikaros/aria2-ext

介绍

Aria2是一款自由、跨平台命令行界面的下载管理器,该软件根据GPLv2许可证进行分发。 支持的下载协议有:HTTP、HTTPS、FTP、Bittorrent和Metalink。

为了方便Nas玩家更好的进行自动化资源下载,特意实现Aria2扩展服务,便于自动订阅并下载想要的资源。

Docker搭建方案

version: "3.8"

services:
  Aria2-Pro:
    container_name: aria2-pro
    image: p3terx/aria2-pro
    hostname: aria2-pro
    environment:
      - PUID=65534
      - PGID=65534
      - UMASK_SET=022
      - RPC_SECRET=P3TERX
      - RPC_PORT=6800
      - LISTEN_PORT=6888
      - DISK_CACHE=64M
      - IPV6_MODE=false
      - UPDATE_TRACKERS=true
      - CUSTOM_TRACKER_URL=https://raw.githubusercontent.com/DeSireFire/animeTrackerList/master/AT_all.txt
      - TZ=Asia/Shanghai
    volumes:
      - /downloads:/downloads
      - vo-aria2:/config
    ports:
      - '6800:6800'
      - '6888:6888'
      - '6888:6888/udp'
    restart: unless-stopped
    # 由于Aria2将继续生成日志,请将日志大小限制为1M,以防止硬盘空间不足。
    logging:
      driver: json-file
      options:
        max-size: 1m
  Aria2-Ext:
    container_name: aria2-ext
    image: cikaros/aria2-ext:v0.3.x
    hostname: aria2-ext
    depends_on:
      - Aria2-Pro
    environment:
      LANG: C.UTF-8
      TZ: Asia/Shanghai
      ARIA2_HOST: aria2-pro
      ARIA2_STARTUP: "true"
      ARIA2_SKIP_BANNER: "true"
    restart: unless-stopped
    volumes:
      - ./aria2-ext.db:/config/data.db
      - /downloads:/downloads
    logging:
      driver: json-file
      options:
        max-size: 1m
  Aria2-Samba:
    container_name: aria2-samba
    image: dperson/samba:latest
    hostname: aria2-samba
    environment:
      TZ: Asia/Shanghai
      NMBD: "yes"
      USER1: "user1;xxxx"
      SHARE1: "downloads;/share/downloads;yes;no;no;user1;user1;user1;备注1"
    volumes:
      - /downloads:/share/downloads
      - vo-samba-etc:/etc
      - vo-samba-cache:/var/cache/samba
      - vo-samba-lib:/var/lib/samba
      - vo-samba-log:/var/log/samba
      - vo-samba-bin:/run/samba
    restart: unless-stopped
    ports:
      - '137:137/udp'
      - '138:138/udp'
      - '139:139'
      - '445:445'
    logging:
      driver: json-file
      options:
        max-size: 1m
    deploy:
      resources:
        limits:
          memory: 512M
volumes:
  vo-aria2:
  vo-samba-etc:
  vo-samba-cache:
  vo-samba-log:
  vo-samba-lib:
  vo-samba-bin:

自定义Nas解决方案
https://blog.cikaros.top/doc/bef2d4b6.html
作者
Cikaros
发布于
2023年4月15日
许可协议