Compare commits

...
62 Commits
Author SHA1 Message Date
junv 6195370246 fix app.conf 2019-10-11 15:22:14 +11:00
junvandGitHub 8802857b70 Merge pull request #63 from wahyd4/junwei/new-nextcloud
Build aria2 ui docker image to integrate with nextcloud
2019-10-11 14:51:20 +11:00
junv e8e3ef9e1e Build aria2 ui docker image to integrate with nextcloud 2019-10-11 14:44:16 +11:00
junv 1ba4a05cd7 Merge branch 'master' into nextcloud 2019-10-11 14:22:08 +11:00
junv 4b80de30f5 Start an experiment to see if anyone going to support this project. 2019-10-10 20:25:16 +11:00
junvandGitHub aae32e6edb Merge pull request #62 from wahyd4/junwei/optional-cap
Allow user to use root to run this application
2019-10-10 20:14:54 +11:00
junv 94b7e09cd1 Allow user to use root to run this application 2019-10-10 20:11:56 +11:00
junvandGitHub 38abdb636c Update issue templates 2019-09-03 13:22:45 +10:00
junv 8f3380f7e0 Update readme about how to mount aria2.conf and aria2.session 2019-09-02 08:24:41 +10:00
junv 9753284f11 Update workflow name 2019-09-01 19:15:42 +10:00
junv 990266f172 Use 3rd party to build and push docker image 2019-09-01 19:10:21 +10:00
junv 2df47bd0b9 github actions fixing.... 2019-09-01 17:57:39 +10:00
junv 48ef649edd trying 2019-09-01 17:54:36 +10:00
junv 08216e7998 github actions 2019-09-01 17:51:23 +10:00
junv 9be91ee609 github actions testing 2019-09-01 17:43:35 +10:00
junv 9ea8d8bf43 debug 2019-09-01 17:36:48 +10:00
junv 032be46fcf debug 2019-09-01 17:34:01 +10:00
junv f86ed0e78a Only run push on master 2019-09-01 17:31:23 +10:00
junv cd9c4b7dee Try to fix multiple line run commands 2019-09-01 17:21:28 +10:00
junv edea603ff1 Only using github actions and remove travis 2019-09-01 17:18:48 +10:00
junvandGitHub 594769e8ab Merge pull request #50 from wahyd4/junwei/no-chown-data-folder
Do not run chown to file downloading folder
2019-09-01 17:17:01 +10:00
junv fd33d75186 #48 Do not run chown to file doownloading folder 2019-09-01 17:05:02 +10:00
junvandGitHub 374df3a244 Update README.CN.md 2019-08-29 15:16:14 +10:00
junvandGitHub 588d294ea4 Update README.md 2019-08-29 15:15:56 +10:00
junvandGitHub 605211a1f2 Update README.CN.md 2019-08-29 15:03:08 +10:00
junvandGitHub c0b17f569a Update README.md 2019-08-29 15:02:54 +10:00
junvandGitHub 09272f54b5 Add github workflow 2019-08-28 09:20:34 +10:00
junvandGitHub b6b2349f8f Merge pull request #43 from wahyd4/junwei/custom-user-binding
Allow user use custom user and group by setting PUID and PGID
2019-07-18 23:32:22 +10:00
junv ba5ecb7e90 refine dockerfile 2019-07-18 23:30:34 +10:00
junv 400b063fcb due to filebrowser installation script issue so switch to use the github binary 2019-07-18 23:18:46 +10:00
junv c2bafc9d71 try to add bash option to see whether it works 2019-07-18 22:59:26 +10:00
junv 17a35679c6 wording refine 2019-07-18 22:40:54 +10:00
junv 67374de106 update readme to add docker-compose 2019-07-18 22:40:32 +10:00
junv c602376541 Update arm dockerfiles 2019-07-18 22:33:11 +10:00
junv 432a9efaa7 Merge branch 'master' into junwei/custom-user-binding 2019-07-18 22:19:26 +10:00
junv fe01505242 Update readme and refine some naming things 2019-07-18 22:18:35 +10:00
junv 810c4f81c9 Bump version to 3.0 due to we had removed 6800 port 2019-07-18 17:57:48 +10:00
junvandGitHub a259134ae3 Merge pull request #44 from gnehs/master
Add websocket support & update ariang to 1.1.1
2019-07-18 17:51:37 +10:00
gnehsandGitHub cd107a137e update ariang to 1.1.1 2019-07-18 14:43:09 +08:00
gnehsandGitHub bdcab8c28f websocket 2019-07-18 14:42:21 +08:00
junvandGitHub 0bf3c50b61 Merge branch 'master' into junwei/custom-user-binding 2019-07-16 23:57:44 +10:00
junvandGitHub ab9c4b5f14 Update .travis.yml 2019-07-16 23:55:02 +10:00
junv 1b130c27a3 Allow user to override default uid and gid. Default ones are 1000:1000 2019-07-16 23:34:29 +10:00
junv 6b434869c3 add non root user make everything related to the application belongs to that user. Huge thanks to @whlsxl as I learned a lot from his code changes but I didn't use custom docker image 2019-07-16 23:17:43 +10:00
junv d83b9d5084 simply dockerfile again 2019-07-16 22:32:51 +10:00
junvandGitHub c105c39ee8 Update README.CN.md 2019-07-15 09:38:36 +10:00
junvandGitHub 7807825e08 Update README.md 2019-07-15 09:37:52 +10:00
junv c405b58610 A URL path improvment to solve https://github.com/wahyd4/aria2-ariang-x-docker-compose/issues/65 2019-05-22 16:16:14 +10:00
junvandGitHub 13be30c82f Update aria2.conf 2019-02-01 11:58:19 +11:00
junv 0b82cbbbf5 Update config align with new official nextcloud docker image 2019-01-18 14:03:19 +11:00
junv f273910ac8 Correct file name 2018-12-15 18:24:22 +11:00
junv d7e435d784 bump ariang to 1.0.0 2018-12-15 17:33:06 +11:00
junv 2d04e95161 Back to use wonderfall/nextcloud , as the official one needs to downloads at starting phase which makes this Image is super slow in China. 2018-08-16 21:00:05 +10:00
junv 7b67d12646 Update ariaNg to 0.40 2018-07-11 22:24:47 +10:00
junv 84ba3370bc Update caddy file to match the default nextcloud docker image, also solve the older nextcloud docker image cannot delete external storage files 2018-07-11 22:23:59 +10:00
junv 4f5b6f2b53 Conflicts:
caddy/Dockerfile
2018-01-21 23:16:09 +11:00
junv e5a9bcf7a9 Update AriaNg to 0.3 release. 2017-12-16 16:10:51 +11:00
junv dcaeec3633 Add bt-tracker servers. 2017-09-18 17:59:38 +08:00
junv 01b446b5bb Add ability to store and retore unfinished tasks. 2017-09-17 10:57:40 +08:00
junv 9c9a36150e Update config for nextcloud 2017-09-06 11:01:38 +08:00
junv 3de5fe6746 Update config for nextcloud. 2017-09-04 11:36:48 +08:00
junv 2f6c18d1e6 update config for filerun. 2017-09-04 11:18:49 +08:00
17 changed files with 216 additions and 136 deletions
+3
View File
@@ -0,0 +1,3 @@
README*.md
LICENSE
.github
+26
View File
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
## Please try to use English to describe your question or issue.
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
+14
View File
@@ -0,0 +1,14 @@
name: Docker Image CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build and Publish main docker image to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: wahyd4/aria2-ui
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASS }}
snapshot: true
-21
View File
@@ -1,21 +0,0 @@
language: go
services:
- docker
addons:
apt:
packages:
- docker-ce
jobs:
include:
- stage: "build and push docker image"
script: |
docker --version
docker build -t wahyd4/aria2-ui:2.0.${TRAVIS_BUILD_NUMBER} .
if [ "${TRAVIS_BRANCH}" == "master" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag wahyd4/aria2-ui:2.0.$TRAVIS_BUILD_NUMBER wahyd4/aria2-ui:latest
docker push wahyd4/aria2-ui:2.0.$TRAVIS_BUILD_NUMBER
docker push wahyd4/aria2-ui:latest
fi
+2 -1
View File
@@ -1,10 +1,11 @@
{$DOMAIN} {
proxy / localhost:8080 {
proxy / file-manager {
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
log stdout
+26 -18
View File
@@ -4,32 +4,40 @@ LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /app
ENV RPC_SECRET=Hello
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV SSL=false
ENV ARIA2_SSL=false
ENV PUID=1000
ENV PGID=1000
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
&& curl https://getcaddy.com | bash -s personal \
&& platform=linux-amd64 \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-${platform}.tgz \
&& tar -zxvf forego-stable-${platform}.tgz \
&& rm -rf forego-stable-${platform}.tgz \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2
RUN curl https://getcaddy.com | bash -s personal
RUN curl -fsSL https://filebrowser.xyz/get.sh | bash
RUN wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz && tar -zxvf forego-stable-linux-amd64.tgz && rm -rf forego-stable-linux-amd64.tgz
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD conf /app/conf
COPY aria2c.sh caddy.sh Procfile /app/
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.0 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
RUN mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.1 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
&& unzip AriaNg-${version}.zip \
&& rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
# folder for storing ssl keys
VOLUME /app/conf/key
@@ -39,4 +47,4 @@ VOLUME /data
EXPOSE 80 443
CMD ["./forego", "start" ]
CMD ["./start.sh"]
-1
View File
@@ -1,3 +1,2 @@
filebrowser: /usr/local/bin/filebrowser -p 8080 -d /app/filebrowser.db -r /data
caddy: /app/caddy.sh
aria2c: /app/aria2c.sh
+40 -12
View File
@@ -4,7 +4,9 @@ Aria2 + AriaNg
[![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Build Status](https://travis-ci.org/wahyd4/aria2-ariang-docker.svg?branch=master)](https://travis-ci.org/wahyd4/aria2-ariang-docker)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
@@ -13,16 +15,17 @@ Aria2 + AriaNg
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [支持的 Docker 环境变量](#支持的-Docker-环境变量)
- [支持的 Docker volume 属性](#支持的-Docker-volume-属性)
- [自动 SSL](#自动-SSL)
- [使用docker-compose 运行](#使用docker-compose-运行)
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
- [自动 SSL](#自动-ssl)
- [自行构建镜像](#自行构建镜像)
- [Docker Hub](#Docker-Hub)
- [使用 Docker compose 来运行](#使用-Docker-compose-来运行)
- [Docker Hub](#docker-hub)
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
- [常见问题](#常见问题)
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.jpg)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
@@ -32,6 +35,7 @@ File Browser
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
* Basic Auth 用户认证
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 支持ARM CPU 架构,因此可以在树莓派中运行,请下载对应的[ARM TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags) 版本, `arm32``arm64`
@@ -58,23 +62,46 @@ File Browser
docker run -d --name ariang \
-p 80:80 \
-p 443:443 \
-e PUID=1000 \
-e PGID=1000 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e DOMAIN=https://example.com \
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /app/a.db:/app/filebrowser.db \
-v /yoursslkeys/:/app/conf/key \
-v <to your aria2.conf>:/app/conf/aria2.conf \
-v <the folder of aria2.conf and aria2.session>:/app/conf \
wahyd4/aria2-ui
```
### 使用docker-compose 运行
如果你不想记住那些命令行,你也可以使用docker-compose来将配置放在`docker-compose.yaml`文件中
```yaml
version: "3.5"
services:
aria2-ui:
restart: unless-stopped
image: wahyd4/aria2-ui:latest
environment:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
然后使用 `docker-compose up -d` 运行即可
### 支持的 Docker 环境变量
* ENABLE_AUTH 启用 Basic auth 用户认证
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* PUID 需要绑定主机的Linux用户ID,可以通过`cat /etc/passwd` 查看用户列表, 默认UID 是`1000`
* PGID 需要绑定的主机的Linux 用户组ID,默认GID 是`1000`
* RPC_SECRET Aria2 RPC 加密 token
* DOMAIN 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
@@ -82,7 +109,7 @@ File Browser
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/app/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/app/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件
* `/app/conf` 该目录下可以放置你的自定义`aria2.conf`配置文件,`aria2.session`,且必须包含这两个文件。第一次使用`aria2.session`时,创建一个空文件即可,该文件会包含aria2当前的下载列表,这样即使容器被销毁也不用担心文件列表丢失了。你也可以直接拷贝当前项目下`conf`目录中的两个文件并使用
* `/app/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
## 自动 SSL
@@ -108,5 +135,6 @@ docker build -t aria2-ui .
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1.当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。因为你需要渠道 `AriaNg设置` -> 页面顶端的 `RPC`页面,将你的Aria2 RPC 地址中的端口从`80`改成你使用的正确端口。因为 AriaNg 仅仅将设置保存在浏览器中,因为当你使用不同的浏览器,或者将浏览器清除缓存后,你都需要重新设置一次。
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。因为你需要渠道 `AriaNg设置` -> 页面顶端的 `RPC`页面,将你的Aria2 RPC 地址中的端口从`80`改成你使用的正确端口。因为 AriaNg 仅仅将设置保存在浏览器中,因为当你使用不同的浏览器,或者将浏览器清除缓存后,你都需要重新设置一次。
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
3. 如果你遇到了和 `setcap` 相关的错误,很大程度说明你说运行的Linux不支持使用非`root`用户来运行本Docker 镜像,因此请显式地设置环境变量`PUID` `PGID``0` ,也就是使用`root` 来运行
+48 -20
View File
@@ -4,29 +4,32 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
[![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Build Status](https://travis-ci.org/wahyd4/aria2-ariang-docker.svg?branch=master)](https://travis-ci.org/wahyd4/aria2-ariang-docker)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
- [Features](#Features)
- [Recommended versions](#Recommended-versions)
- [How to run](#How-to-run)
- [Quick run](#Quick-run)
- [Full features run](#Full-features-run)
- [Supported Environment Variables](#Supported-Environment-Variables)
- [Supported Volumes](#Supported-Volumes)
- [Auto SSL enabling](#Auto-SSL-enabling)
- [Build the image by yourself](#Build-the-image-by-yourself)
- [Docker Hub](#Docker-Hub)
- [Usage it in Docker compose](#Usage-it-in-Docker-compose)
- [FAQ](#FAQ)
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
- [Features](#features)
- [Recommended versions](#recommended-versions)
- [How to run](#how-to-run)
- [Quick run](#quick-run)
- [Full features run](#full-features-run)
- [Run with docker-compose](#run-with-docker-compose)
- [Supported Environment Variables](#supported-environment-variables)
- [Supported Volumes](#supported-volumes)
- [Auto SSL enabling](#auto-ssl-enabling)
- [Build the image by yourself](#build-the-image-by-yourself)
- [Docker Hub](#docker-hub)
- [Usage it in Docker compose](#usage-it-in-docker-compose)
- [FAQ](#faq)
One Docker image for all file downloading, managing, playing and evening sharing platforms!
Besides, it's small and ARM CPU supported which means you can run it on Raspberry Pi.
Besides, it's pretty small and ARM CPU supported which means you can run it on Raspberry Pi🍓.
Last but not least, SSL enabling so easy!
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.jpg)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
@@ -36,6 +39,7 @@ File Browser
* Aria2 (SSL support)
* AriaNg
* Auto HTTPS Let's Encrypt
* Bind non root user into container, so non root user can also manage downloaded files.
* Basic Auth
* File indexing and video playing ([File Browser](https://filebrowser.xyz/))
* Add support for ARM CPUs, please choose correct [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
@@ -64,31 +68,54 @@ File Browser
docker run -d --name ariang \
-p 80:80 \
-p 443:443 \
-e PUID=1000 \
-e PGID=1000 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e DOMAIN=https://example.com \
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /app/a.db:/app/filebrowser.db \
-v /yoursslkeys/:/app/conf/key \
-v <to your aria2.conf>:/app/conf/aria2.conf \
-v <the folder of aria2.conf and aria2.session>:/app/conf \
wahyd4/aria2-ui
```
### Run with docker-compose
If you wanna get rid of those annoying command line things, just put the following sample content into `docker-compose.yaml`
```yaml
version: "3.5"
services:
aria2-ui:
restart: unless-stopped
image: wahyd4/aria2-ui:latest
environment:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
Then just run `docker-compose up -d`, that's it!
### Supported Environment Variables
* ENABLE_AUTH whether to enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth
* ARIA2_PWD Basic Auth password
* PUID Bind Linux UID into container which means you can use non `root` user to manage downloaded files, default UID is `1000`
* PGID Bind Linux GID into container, default GID is 1000
* RPC_SECRET The Aria2 RPC secret token
* DOMAIN The domain you'd like to bind
* DOMAIN The domain you'd like to bind, when domain is a `https://` thing, then auto SSL feature will be enabled
### Supported Volumes
* `/data` The folder which contains all the files you download.
* `/app/conf/key` The folder which stored Aria2 SSL `certificate` and `key` file. `Notice`: The certificate file should be named `aria2.crt` and the key file should be named `aria2.key`
* `/app/conf/aria2.conf` The Aria2 configuration file.
* `/app/conf` The Aria2 configuration and file session folder. Make sure you have `aria2.conf` and `aria2.session` file. For the first time `aria2.session` just need to be a empty file can be appended. You can also user the templates for these two file in the `conf` folder of this project.
* `/app/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
## Auto SSL enabling
@@ -115,3 +142,4 @@ docker build -t aria2-ui .
## FAQ
1. When you running the docker image with non `80` port or you have HTTPS enabled, you will meet the error says `Aria2 Status Disconnected`, then you will need to go to `AriaNg Settings` -> RPC (at the top of the page) to modify the port value in `Aria2 RPC Address` field. Due to AriaNg store all configurations in local browser, so you need to do this per browser.
2. If there is no speed at all when you downloading a BitTorrent file, please try to use a popular torrent file first to help the application to cache `DHT` file. Then the speed should get fast and fast, as well as downloading other links.
3. If you see any errors related to `setcap` which probably means the Linux you are running doesn't support running this application with `non-root` user. So please specify the `PUID` and `PGID` to `0` explicitly to use `root` user to run it.
+2 -1
View File
@@ -1,10 +1,11 @@
{$DOMAIN} {
proxy / localhost:8080 {
proxy / file-manager {
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
gzip
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/bash -eu
if [ "$SSL" = "true" ]; then
if [ "$ARIA2_SSL" = "true" ]; then
echo "Start aria2 with secure config"
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
+27 -18
View File
@@ -4,32 +4,41 @@ LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /app
ENV RPC_SECRET=Hello
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV SSL=false
ENV ARIA2_SSL=false
ENV PUID=1000
ENV PGID=1000
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
&& curl https://getcaddy.com | bash -s personal \
&& platform=linux-armv6 \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm.tgz \
&& tar -zxvf forego-stable-linux-arm.tgz \
&& rm -rf forego-stable-linux-arm.tgz \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2
RUN curl https://getcaddy.com | bash -s personal
RUN curl -fsSL https://filebrowser.xyz/get.sh | bash
RUN wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm.tgz && tar -zxvf forego-stable-linux-arm.tgz && rm -rf forego-stable-linux-arm.tgz
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD conf /app/conf
COPY aria2c.sh caddy.sh Procfile /app/
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.0 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
RUN mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.1 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
&& unzip AriaNg-${version}.zip \
&& rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /app/conf/key
@@ -38,4 +47,4 @@ VOLUME /data
EXPOSE 80 443
CMD ["./forego", "start" ]
CMD ["./start.sh"]
-41
View File
@@ -1,41 +0,0 @@
FROM arm64v8/alpine:3.8
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /app
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV SSL=false
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal
RUN curl -fsSL https://filebrowser.xyz/get.sh | bash
RUN wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm64.tgz && tar -zxvf forego-stable-linux-arm64.tgz && rm -rf forego-stable-linux-arm64.tgz
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
ADD conf /app/conf
COPY aria2c.sh caddy.sh Procfile /app/
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.0 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /app/conf/key
# User downloaded files
VOLUME /data
EXPOSE 80 443
CMD ["./forego", "start" ]
+2 -2
View File
@@ -35,8 +35,8 @@ max-upload-limit=0
#lowest-speed-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
# dir=/user-files/superuser/
# File downloading folder
dir=/data
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Executable
+19
View File
@@ -0,0 +1,19 @@
#! /bin/bash -eu
echo "**** update uid and gid to ${PUID}:${PGID} ****"
groupmod -o -g "$PGID" junv
usermod -o -u "$PUID" junv
chown -R junv:junv \
/app \
/usr/local \
/var/log \
/data
chmod +x /app/caddy.sh \
/app/aria2c.sh
echo "**** give caddy permissions to use low ports ****"
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
"${@-sh}"
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash -eu
if [ "$PGID" != "0" ]; then
$(dirname $0)/init.sh chpst -u junv ./forego start
else
./forego start
fi