Compare commits

..
Author SHA1 Message Date
junv 3100858c42 update readme 2019-07-13 14:58:21 +10:00
junvandGitHub e81b6ef71b Update README.md 2019-07-13 14:06:48 +10:00
junvandGitHub 3d7d585c25 Update README.md 2019-07-13 13:48:59 +10:00
junvandGitHub 1485c0682f Merge pull request #40 from wahyd4/simplify-and-stablization
Simplify and stablization
2019-07-13 13:46:56 +10:00
junv 13b5e7557b Put english readme first 2019-07-13 13:42:09 +10:00
junv 5f3d232f3a Using forogo to manage mutliple processes 2019-07-13 13:16:16 +10:00
junv 54faacb741 use port 80 to serve 6800 jsonrpc request 2019-07-13 11:33:41 +10:00
junv c8e4704aa7 Speicfy port when boot file browser instead of caddy 2019-06-15 16:52:02 +10:00
junv 4332e37d40 Merge branch 'master' of github.com:wahyd4/aria2-ariang-docker 2019-06-15 16:41:16 +10:00
junv 58d3edf61a Update caddy startup command to specify port 2019-06-15 16:41:11 +10:00
junvandGitHub e2b7a41040 Update README.md 2019-05-22 16:57:40 +10:00
junvandGitHub bb8a60ddbf Update README.md 2019-05-22 16:00:26 +10:00
junvandGitHub 1e8a02ebe3 Update README.md 2019-05-22 13:03:04 +10:00
junvandGitHub f6634fea89 Merge pull request #37 from AtrisMio/patch-redir
Patch redir
2019-05-19 12:03:16 +10:00
AtarisandGitHub cee7668e8c Update SecureCaddyfile 2019-05-19 00:26:55 +08:00
AtarisandGitHub 7175940215 patch redir 2019-05-19 00:24:51 +08:00
junv 93aec37485 update readme 2019-05-18 09:10:06 +10:00
junv a04e6a9b06 speed up building 2019-05-18 09:00:35 +10:00
junvandGitHub 3f115132d0 Merge pull request #36 from wahyd4/add-license-1
Create LICENSE
2019-05-18 08:59:32 +10:00
junvandGitHub 098ffb3c07 Merge branch 'master' into add-license-1 2019-05-18 08:53:35 +10:00
junvandGitHub b5e55f33a5 Merge pull request #35 from wahyd4/junwei/ad-ci-to-build-arms
Use osx to build image for different CPU platforms
2019-05-18 08:52:07 +10:00
junvandGitHub 6c0d9a7987 Create LICENSE 2019-05-18 08:51:50 +10:00
junv 288e429d47 Fix build 2019-05-18 08:41:19 +10:00
junv 89a9a34727 Unfortunately travis ci doesnn't support mac 2019-05-18 08:37:24 +10:00
junv b9026d8ca3 Try to use osx to build image 2019-05-18 08:32:14 +10:00
junv 6fe9c65cfb Try to fix the build condition 2019-05-18 00:44:27 +10:00
junv 0a4eff4988 Update 2019-05-18 00:39:57 +10:00
junv 230a21fa4f Update readme 2019-05-18 00:39:09 +10:00
junvandGitHub cc9cddc232 Merge pull request #34 from wahyd4/junwei/update-ariang-arms
Update AriaNg version to 1.1.0 and upgrade the arm dockerfiles to date.
2019-05-18 00:36:59 +10:00
junv a311641b41 Simply build script 2019-05-18 00:35:29 +10:00
junv 310116c3d0 skip push command 2019-05-18 00:30:22 +10:00
junv fbf75ca833 Merge branch 'master' into junwei/update-ariang-arms 2019-05-18 00:21:14 +10:00
junv a4d0f6ac08 Try to update docker version 2019-05-18 00:18:34 +10:00
junv 25d1446c72 update version 2019-05-18 00:12:08 +10:00
junv bc00550785 update ariang 2019-05-18 00:07:17 +10:00
14 changed files with 486 additions and 264 deletions
+10 -19
View File
@@ -1,30 +1,21 @@
language: go
services:
- docker
env:
global:
- NAME=aria2-ui
- CACHE_FOLDER=$HOME/docker-images
- CACHE_FILE=${CACHE_FOLDER}/${NAME}-${TRAVIS_COMMIT}.tgz
addons:
apt:
packages:
- docker-ce
jobs:
include:
- stage: build docker image
script:
- docker build -t wahyd4/aria2-ui:1.0.${TRAVIS_BUILD_NUMBER} .
- mkdir -p ${CACHE_FOLDER}
- docker save wahyd4/aria2-ui:1.0.${TRAVIS_BUILD_NUMBER} | gzip -c > ${CACHE_FILE}
- stage: push docker image
if: branch = master
- stage: "build and push docker image"
script: |
if [[ -f ${CACHE_FILE} ]]; then docker load -i ${CACHE_FILE}; fi
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:1.0.$TRAVIS_BUILD_NUMBER wahyd4/aria2-ui:latest
docker push wahyd4/aria2-ui:1.0.$TRAVIS_BUILD_NUMBER
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
cache:
directories:
- ${CACHE_FOLDER}
+9 -20
View File
@@ -2,35 +2,24 @@
proxy / localhost:8080 {
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
}
log stdout
errors stdout
gzip
}
{$DOMAIN}/ui {
redir / /ui/ 301
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
}
{$DOMAIN}/css {
root /usr/local/www/aria2/css
gzip
}
{$DOMAIN}/js {
root /usr/local/www/aria2/js
gzip
}
{$DOMAIN}/fonts {
root /usr/local/www/aria2/fonts
gzip
}
{$DOMAIN}/langs {
root /usr/local/www/aria2/langs
gzip
}
+16 -12
View File
@@ -2,37 +2,41 @@ FROM alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
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 screen aria2 tar --no-cache
&& 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-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 conf /root/conf
COPY aria2c.sh /root
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 /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& 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 \
&& chmod +x /root/aria2c.sh
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /root/conf/key
# User downloaded files
# folder for storing ssl keys
VOLUME /app/conf/key
# file downloading folder
VOLUME /data
EXPOSE 6800 80 443
EXPOSE 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
CMD ["./forego", "start" ]
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [2019] [Junwei Zhao]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+3
View File
@@ -0,0 +1,3 @@
filebrowser: /usr/local/bin/filebrowser -p 8080 -d /app/filebrowser.db -r /data
caddy: /app/caddy.sh
aria2c: /app/aria2c.sh
+112
View File
@@ -0,0 +1,112 @@
Aria2 + AriaNg
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.md) | 简体中文
[![](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)
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
- [功能特性](#功能特性)
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [支持的 Docker 环境变量](#支持的-Docker-环境变量)
- [支持的 Docker volume 属性](#支持的-Docker-volume-属性)
- [自动 SSL](#自动-SSL)
- [自行构建镜像](#自行构建镜像)
- [Docker Hub](#Docker-Hub)
- [使用 Docker compose 来运行](#使用-Docker-compose-来运行)
- [常见问题](#常见问题)
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* Basic Auth 用户认证
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 支持ARM CPU 架构,因此可以在树莓派中运行,请下载对应的[ARM TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags) 版本, `arm32``arm64`
## 推荐使用的docker image tag
* wahyd4/aria2-ui:latest
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
## 安装于运行
### 快速运行
```shell
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* 请使用 admin/admin 进行登录
### 开启所有功能
```bash
docker run -d --name ariang \
-p 80:80 \
-p 443:443 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-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 \
wahyd4/aria2-ui
```
### 支持的 Docker 环境变量
* ENABLE_AUTH 启用 Basic auth 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* RPC_SECRET Aria2 RPC 加密 token
* DOMAIN 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/app/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/app/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件。
* `/app/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
## 自动 SSL
请在绑定域名前,设置`DNS`的一条`A`记录,将运行docker的主机IP绑定到该域名。然后你仅仅需要在运行时添加`e`设置即可。
```bash
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
```
## 自行构建镜像
```
docker build -t aria2-ui .
```
## Docker Hub
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## 使用 Docker compose 来运行
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1.当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。因为你需要渠道 `AriaNg设置` -> 页面顶端的 `RPC`页面,将你的Aria2 RPC 地址中的端口从`80`改成你使用的正确端口。因为 AriaNg 仅仅将设置保存在浏览器中,因为当你使用不同的浏览器,或者将浏览器清除缓存后,你都需要重新设置一次。
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
-88
View File
@@ -1,88 +0,0 @@
Aria2 + AriaNg
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.md)
[![](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)
- [Features](#features)
- [How to run](#how-to-run)
- [Simple Usage](#simple-usage)
- [Fully Usage](#fully-usage)
- [Supported Environment Variables](#supported-environment-variables)
- [Supported Volumes](#supported-volumes)
- [Docker Hub](#docker-hub)
- [Usage it in Docker compose](#usage-it-in-docker-compose)
- [FAQ](#faq)
Aria2
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## Features
* Aria2 (SSL support)
* AriaNg
* Auto HTTPS Let's Encrypt
* 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)
## How to run
### Simple Usage
```shell
docker run -d --name aria2-ui -p 80:80 -p 6800:6800 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/> **The tailling `/` is necessary**
* FileManger: <http://yourip>
* Please use admin/admin as username and password to login
### Fully Usage
```bash
docker run -d --name ariang \
-p 80:80 -p 6800:6800 -p 443:443 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /root/a.db:/root/filebrowser.db \
-v /yoursslkeys/:/root/conf/key \
-v <to your aria2.conf>:/root/conf/aria2.conf \
wahyd4/aria2-ui
```
### Supported Environment Variables
* ENABLE_AUTH enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth
* RPC_SECRET The Aria2 RPC secret token
* DOMAIN The domain you'd like to bind
### Supported Volumes
* `/data` The folder of all Aria2 downloaded files.
* `/root/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`
* `/root/conf/aria2.conf` The Aria2 configuration file.
* `/root/filebrowser.db` File Browser settings db, make sure you make a empty file first on your host.
## Docker Hub
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## Usage it in Docker compose
Please refer <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## FAQ
1. 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.
+70 -53
View File
@@ -1,87 +1,104 @@
Aria2 + AriaNg
Aria2 + AriaNg + Filebrowser
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.EN.md) | 简体中文
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.CN.md)
[![](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)
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
- [功能特性](#功能特性)
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
- [自行构建镜像](#自行构建镜像)
- [Docker Hub](#docker-hub)
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
- [常见问题](#常见问题)
- [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)
Aria2
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.
Last but not least, SSL enabling so easy!
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* Basic Auth 用户认证
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 支持ARM CPU 架构,因此可以在树莓派中运行,请下载对应的[ARM TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags) 版本, `arm32``arm64`
## Features
## 推荐使用的docker image tag
* Aria2 (SSL support)
* AriaNg
* Auto HTTPS Let's Encrypt
* 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)
* latest
* arm32
* arm64
## Recommended versions
## 安装于运行
* wahyd4/aria2-ui:latest
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
### 快速运行
## How to run
### Quick run
```shell
docker run -d --name aria2-ui -p 80:80 -p 6800:6800 wahyd4/aria2-ui
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/> **最后的斜线必须带上!**
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* 请使用 admin/admin 进行登录
### 开启所有功能
* Please use `admin`/`admin` as username and password to login for the first time.
### Full features run
```bash
docker run -d --name ariang \
-p 80:80 -p 6800:6800 -p 443:443 \
-p 80:80 \
-p 443:443 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /root/a.db:/root/filebrowser.db \
-v /yoursslkeys/:/root/conf/key \
-v <to your aria2.conf>:/root/conf/aria2.conf \
-v /app/a.db:/app/filebrowser.db \
-v /yoursslkeys/:/app/conf/key \
-v <to your aria2.conf>:/app/conf/aria2.conf \
wahyd4/aria2-ui
```
### 支持的 Docker 环境变量
### Supported Environment Variables
* ENABLE_AUTH 启用 Basic auth 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* RPC_SECRET Aria2 RPC 加密 token
* DOMAIN 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
* ENABLE_AUTH whether to enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth
* RPC_SECRET The Aria2 RPC secret token
* DOMAIN The domain you'd like to bind
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/root/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/root/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件。
* `/root/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
### 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/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
## 自行构建镜像
## Auto SSL enabling
Make sure you have add proper `A` record point to the host you running to your domain `DNS` record list, then just add `e` option to bind the `https` domain when you run the image
```bash
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
```
## Build the image by yourself
```
docker build -t aria2-ui .
@@ -91,10 +108,10 @@ docker build -t aria2-ui .
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## 使用 Docker compose 来运行
## Usage it in Docker compose
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
Please refer <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
## 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.
+8 -20
View File
@@ -3,12 +3,20 @@
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/ui {
redir / /ui/ 301
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
@@ -17,23 +25,3 @@
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/css {
root /usr/local/www/aria2/css
gzip
}
{$DOMAIN}/js {
root /usr/local/www/aria2/js
gzip
}
{$DOMAIN}/fonts {
root /usr/local/www/aria2/fonts
gzip
}
{$DOMAIN}/langs {
root /usr/local/www/aria2/langs
gzip
}
Regular → Executable
+6 -19
View File
@@ -1,30 +1,17 @@
#! /bin/bash -eu
echo "Run aria2c and ariaNG"
if [ "$ENABLE_AUTH" = "true" ]; then
echo "Using Basic Auth config file "
CADDY_FILE=/usr/local/caddy/SecureCaddyfile
else
echo "Using caddy without Basic Auth"
CADDY_FILE=/usr/local/caddy/Caddyfile
fi
if [ "$SSL" = "true" ]; then
echo "Start aria2 with secure config"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D \
--enable-rpc --rpc-listen-all \
--rpc-certificate=/root/conf/key/aria2.crt \
--rpc-private-key=/root/conf/key/aria2.key \
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
--enable-rpc --rpc-listen-all \
--rpc-certificate=/app/conf/key/aria2.crt \
--rpc-private-key=/app/conf/key/aria2.key \
--rpc-secret="$RPC_SECRET" --rpc-secure \
&& (nohup sh -c "/usr/local/bin/filebrowser -d /root/filebrowser.db -l /var/log/file-browser/out.log -r /data" &)\
&& /usr/local/bin/caddy -quic --conf ${CADDY_FILE}
else
echo "Start aria2 with standard mode"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D \
--enable-rpc --rpc-listen-all \
&& (nohup sh -c "/usr/local/bin/filebrowser -d /root/filebrowser.db -l /var/log/file-browser/out.log -r /data" &)\
&& /usr/local/bin/caddy -quic --conf ${CADDY_FILE}
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
fi
+18 -15
View File
@@ -2,37 +2,40 @@ FROM arm32v6/alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
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 screen aria2 tar --no-cache
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal http.filebrowser
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
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 conf /app/conf
COPY aria2c.sh caddy.sh Procfile /app/
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
#AriaNg
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& 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 \
&& chmod +x /root/aria2c.sh
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /root/conf/key
VOLUME /app/conf/key
# User downloaded files
VOLUME /data
EXPOSE 6800 80 443
EXPOSE 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
CMD ["./forego", "start" ]
+19 -16
View File
@@ -1,38 +1,41 @@
FROM arm64v8/alpine:edge
FROM arm64v8/alpine:3.8
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
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 screen aria2 tar --no-cache
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal http.filebrowser
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
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
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& 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 \
&& chmod +x /root/aria2c.sh
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /root/conf/key
VOLUME /app/conf/key
# User downloaded files
VOLUME /data
EXPOSE 6800 80 443
EXPOSE 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
CMD ["./forego", "start" ]
Executable
+12
View File
@@ -0,0 +1,12 @@
#! /bin/bash -eu
echo "Run aria2c and ariaNG"
if [ "$ENABLE_AUTH" = "true" ]; then
echo "Using Basic Auth config file "
export CADDY_FILE=/usr/local/caddy/SecureCaddyfile
else
echo "Using caddy without Basic Auth"
export CADDY_FILE=/usr/local/caddy/Caddyfile
fi
/usr/local/bin/caddy -quic --conf ${CADDY_FILE}
+2 -2
View File
@@ -57,9 +57,9 @@ log-level=notice
## 进度保存相关 ##
# 从会话文件中读取下载任务
input-file=/root/conf/aria2.session
input-file=/app/conf/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
save-session=/root/conf/aria2.session
save-session=/app/conf/aria2.session
# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
save-session-interval=10