[
  {
    "path": "Dockerfile",
    "content": "FROM alpine:edge\n\nMAINTAINER xujinkai <jack777@xujinkai.net>\n\nRUN apk update && \\\n\tapk add --no-cache --update bash && \\\n\tmkdir -p /conf && \\\n\tmkdir -p /conf-copy && \\\n\tmkdir -p /data && \\\n\tapk add --no-cache --update aria2 && \\\n\tapk add git && \\\n\tgit clone https://github.com/ziahamza/webui-aria2 /aria2-webui && \\\n    rm /aria2-webui/.git* -rf && \\\n    apk del git && \\\n\tapk add --update darkhttpd\n\nADD files/start.sh /conf-copy/start.sh\nADD files/aria2.conf /conf-copy/aria2.conf\nADD files/on-complete.sh /conf-copy/on-complete.sh\n\nRUN chmod +x /conf-copy/start.sh\n\nWORKDIR /\nVOLUME [\"/data\"]\nVOLUME [\"/conf\"]\nEXPOSE 6800\nEXPOSE 80\nEXPOSE 8080\n\nCMD [\"/conf-copy/start.sh\"]\n"
  },
  {
    "path": "README.md",
    "content": "# 此项目无限期停止维护。NO LONGER SUPPORT。\n\nPleases Fork this project and modify for yourself.\n\n---\n\nAria2 with webui\n---\nOnly 29Mb.  \nEdit config file out of the image.  \nMove file completed to another folder.  \n(Tasks that contains more than one files will not be moved.)  \n\n### Install\nI. replace **/DOWNLOAD_DIR** and **/CONFIG_DIR** for save data, and **YOUR_SECRET_CODE** for security. Run command below  \n```\nsudo docker run -d \\\n--name aria2-with-webui \\\n-p 6800:6800 \\\n-p 6880:80 \\\n-p 6888:8080 \\\n-v /DOWNLOAD_DIR:/data \\\n-v /CONFIG_DIR:/conf \\\n-e SECRET=YOUR_SECRET_CODE \\\nxujinkai/aria2-with-webui\n```\n  \nII. Open `http://serverip:6880/` for aria2-webui, open `http://serverip:6888/` to browse data folder.  \n\n### Build:  \n`sudo docker build -f Dockerfile -t xujinkai/aria2-with-webui .`  \n\n### Link:  \nhttps://github.com/aria2/aria2  \nhttps://github.com/ziahamza/webui-aria2  \n\nhttps://github.com/acgotaku/BaiduExporter  \n"
  },
  {
    "path": "files/aria2.conf",
    "content": "dir=/data/_dl\non-download-complete=/conf/on-complete.sh\ninput-file=/conf/aria2.session\nsave-session=/conf/aria2.session\n\nfile-allocation=falloc\nlog-level=warn\nenable-http-pipelining=true\n\nmax-concurrent-downloads=3\nmax-connection-per-server=10\nmin-split-size=10M\nsplit=10\ncontinue=true\nmax-overall-download-limit=0\nmax-overall-upload-limit=1K\n\nbt-detach-seed-only=true\nseed-ratio=1.0\nseed-time=0\n\nenable-rpc=true\nrpc-listen-all=true\nrpc-allow-origin-all=true\nrpc-listen-port=6800\n"
  },
  {
    "path": "files/on-complete.sh",
    "content": "#!/bin/sh\nif [ $2 -eq 1 ]; then\n\tmv \"$3\" /data\nfi\necho [$(date)] $2, $3, $1 \"<br>\" >> /data/_log.html"
  },
  {
    "path": "files/start.sh",
    "content": "#!/bin/sh\nif [ ! -f /conf/aria2.conf ]; then\n\tcp /conf-copy/aria2.conf /conf/aria2.conf\n\tif [ $SECRET ]; then\n\t\techo \"rpc-secret=${SECRET}\" >> /conf/aria2.conf\n\tfi\nfi\nif [ ! -f /conf/on-complete.sh ]; then\n\tcp /conf-copy/on-complete.sh /conf/on-complete.sh\nfi\n\nchmod +x /conf/on-complete.sh\ntouch /conf/aria2.session\n\ndarkhttpd /aria2-webui/docs --port 80 &\ndarkhttpd /data --port 8080 &\naria2c --conf-path=/conf/aria2.conf\n"
  }
]