mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 13:26:07 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5429f4ebc5 | ||
|
|
10d1d6e139 | ||
|
|
d1d91da0de | ||
|
|
346d54937b | ||
|
|
16f2c119b8 | ||
|
|
b0f68d7cc8 | ||
|
|
6c14c22f1d | ||
|
|
b61bdcf173 | ||
|
|
1cb67615c3 | ||
|
|
9f05b5b178 | ||
|
|
9a045ddd90 | ||
|
|
5e427d6243 | ||
|
|
89e6a4eb63 | ||
|
|
f11ddb8352 | ||
|
|
14a3ad5e53 | ||
|
|
2d7a2fbe78 | ||
|
|
4796f04e6f | ||
|
|
6b2f07ca73 | ||
|
|
fb8dae785e | ||
|
|
9d3cd8cff8 | ||
|
|
554489a936 | ||
|
|
5086ded836 | ||
|
|
601b7426c4 | ||
|
|
90a4e37726 | ||
|
|
fc3f3035ac | ||
|
|
b8c7667523 | ||
|
|
3097a69b72 | ||
|
|
8de7bcead4 | ||
|
|
8c303a67e5 | ||
|
|
36d602b6fa | ||
|
|
aa8fa89a56 | ||
|
|
bdd122231c | ||
|
|
5670d183fe | ||
|
|
4d26b3527e | ||
|
|
9aec111d0f | ||
|
|
d70d81ea73 | ||
|
|
8bab5e7280 | ||
|
|
f12066c0fa |
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [wahyd4]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: https://www.paypal.me/junvzhao
|
||||
@@ -1,14 +1,74 @@
|
||||
name: Docker Image CI
|
||||
on: [push]
|
||||
name: Build and Push docker image
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
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
|
||||
-
|
||||
name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=wahyd4/aria2-ui
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64
|
||||
VERSION=edge
|
||||
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
fi
|
||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
||||
fi
|
||||
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
|
||||
--build-arg VCS_REF=${GITHUB_SHA::8} \
|
||||
${TAGS} --file Dockerfile .
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
-
|
||||
name: Docker Buildx (build)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Login to DockerHub
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
name: wahyd4/aria2-ui
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASS }}
|
||||
snapshot: true
|
||||
-
|
||||
name: Push docker images to Dockerhub
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Inspect image
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
name: Docker Image Vulnability Check
|
||||
on: [push]
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag local/aria-ui:latest
|
||||
- name: Scan image
|
||||
uses: anchore/scan-action@v1
|
||||
uses: anchore/scan-action@v2
|
||||
with:
|
||||
image-reference: "local/aria-ui:latest"
|
||||
image: "local/aria-ui:latest"
|
||||
fail-build: true
|
||||
severity-cutoff: high
|
||||
- name: grype scan JSON results
|
||||
run: for j in `ls ./anchore-reports/*.json`; do echo "---- ${j} ----"; cat ${j}; echo; done
|
||||
|
||||
@@ -4,22 +4,25 @@
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
redir /ui /ui/ 301
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy http://localhost:5572
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /ui/* {
|
||||
uri strip_prefix /ui
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
|
||||
+8
-40
@@ -1,4 +1,4 @@
|
||||
FROM alpine:latest
|
||||
FROM alpine:edge
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
@@ -6,7 +6,8 @@ WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=http://localhost
|
||||
ENV ENABLE_RCLONE=true
|
||||
ENV DOMAIN=:80
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
@@ -18,46 +19,13 @@ ENV RCLONE_CONFIG=/app/conf/rclone.conf
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
|
||||
ADD Caddyfile SecureCaddyfile HerokuCaddyfile /usr/local/caddy/
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar mailcap --no-cache \
|
||||
&& caddy_tag=2.2.1 \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& tar -zxvf caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& filebrowser_version=v2.7.0 \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md CHANGELOG.md \
|
||||
&& 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 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip \
|
||||
&& unzip rclone-*.zip \
|
||||
&& cd rclone-*-linux-amd64 \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/rclone-*.zip \
|
||||
&& rm -rf /app/rclone-* \
|
||||
&& mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& version=1.1.7 \
|
||||
&& 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
|
||||
RUN ./install.sh
|
||||
|
||||
RUN rm ./install.sh
|
||||
|
||||
# folder for storing ssl keys
|
||||
VOLUME /app/conf/key
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
debug
|
||||
admin off
|
||||
auto_https off
|
||||
}
|
||||
|
||||
:PORT
|
||||
|
||||
basicauth / {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data
|
||||
caddy: /app/caddy.sh
|
||||
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
|
||||
aria2c: /app/aria2c.sh
|
||||
rclone: /app/rclone.sh
|
||||
|
||||
+16
-13
@@ -5,7 +5,11 @@ Aria2 + AriaNg
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](https://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badges.toozhao.com/badges/01EJ791D8BB43PDS8D7PP7H0YE/green.svg "Get your own page views count badge on badges.toozhao.com")
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
|
||||
|
||||
|
||||
[](https://badges.toozhao.com/stats/01EJ791D8BB43PDS8D7PP7H0YE "Get your own page views count badge on badges.toozhao.com")
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
|
||||
|
||||
@@ -14,7 +18,7 @@ Aria2 + AriaNg
|
||||
|
||||
- [功能特性](#功能特性)
|
||||
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
|
||||
- [安装于运行](#安装于运行)
|
||||
- [安装与运行](#安装与运行)
|
||||
- [快速运行](#快速运行)
|
||||
- [开启所有功能](#开启所有功能)
|
||||
- [使用docker-compose 运行](#使用docker-compose-运行)
|
||||
@@ -40,29 +44,27 @@ File Browser
|
||||
* 自动 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`
|
||||
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 支持ARM CPU 架构,因此可以在树莓派等设备上运行,
|
||||
|
||||
## 推荐使用的docker image tag
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
* wahyd4/aria2-ui:arm32
|
||||
* wahyd4/aria2-ui:arm64
|
||||
|
||||
> ‼️ 如果你在莓派上运行本程序,请使用 `arm32` 版本
|
||||
> Docker会为你自动选择对应CPU平台的image. e.g. arm64v8 或者 x86_64 平台
|
||||
|
||||
## 安装于运行
|
||||
## 安装与运行
|
||||
|
||||
### 快速运行
|
||||
|
||||
```shell
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* Aria2: <http://yourip>
|
||||
* Filebrowser: <http://yourip/files>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* 请使用 admin/admin 进行登录, 在如果没有修改`ARIA2_USER`,`ARIA2_PWD`的情况下,请使用`user`/`password`登录`Rclone`
|
||||
* 请使用 admin/admin 进行登录Filebrowser, 在如果没有修改`ARIA2_USER`,`ARIA2_PWD`的情况下,请使用`user`/`password`登录`Rclone`
|
||||
### 开启所有功能
|
||||
```bash
|
||||
docker run -d --name ariang \
|
||||
@@ -105,6 +107,7 @@ services:
|
||||
### 支持的 Docker 环境变量
|
||||
|
||||
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
|
||||
* ENABLE_RCLONE 是否启用 RCLONE,由于Rclone 的初次运行需要从Github 下载文件,由于你懂的原因,可能文件下载失败,进而导致整个程序崩溃,这时你需要设置为`false`
|
||||
* ARIA2_USER Basic Auth 用户认证用户名,Rclone也使用该参数
|
||||
* ARIA2_PWD Basic Auth 密码,Rclone也使用该参数
|
||||
* ARIA2_EXTERNAL_PORT 从外部可以访问到的 Aria2 端口,默认为 HTTP 的`80`
|
||||
|
||||
@@ -5,7 +5,12 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](https://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badge.home.toozhao.com/svg/aria2-ariang-docker "Page Views Count")
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
|
||||
|
||||
[](https://badges.toozhao.com/stats/aria2-ariang-docker "Page Views Count")
|
||||
|
||||
|
||||
|
||||
**If you like this project, please consider support me / 如果喜欢本项目,请考虑打赏,谢谢!**
|
||||
|
||||
@@ -27,7 +32,7 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
|
||||
One Docker image for file downloading, managing, sharing, as well as video playing and evening cloud storage synchronization.
|
||||
|
||||
Furthermore, it's pretty small and ARM CPU compatible which means you can also run it on Raspberry Pi🍓. (**with proper arm docker image tag**)
|
||||
Furthermore, it's pretty small and ARM CPU compatible which means you can also run it on Raspberry Pi🍓.
|
||||
|
||||
Last but not least, Auto HTTPS can't be more easy!
|
||||
|
||||
@@ -42,20 +47,18 @@ File Browser
|
||||
* [Aria2 (SSL support)](https://aria2.github.io)
|
||||
* [AriaNg](https://github.com/mayswind/AriaNg)
|
||||
* [Rclone](https://rclone.org/)
|
||||
* [File Browser](https://filebrowser.xyz/): Files mangement and videos playing
|
||||
* 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/))
|
||||
* Support ARM CPUs, but please choose a proper [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Support ARM CPUs as well, all supported CPU platforms can be found [here](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Cloud Storage platforms synchronization
|
||||
|
||||
## Recommended versions
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
* wahyd4/aria2-ui:arm32
|
||||
* wahyd4/aria2-ui:arm64
|
||||
|
||||
> ‼️ If you plan to run this docker image on Raspberry Pi,please use tag `arm32`
|
||||
> Docker will pick the the proper ARCH for you. e.g. arm64v8 or x86_64
|
||||
|
||||
## How to run
|
||||
|
||||
@@ -65,10 +68,10 @@ File Browser
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* Aria2: <http://yourip>
|
||||
* FileManger: <http://yourip/files>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* Please use `admin`/`admin` as username and password to login for the first time, and `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
|
||||
* Please use `admin`/`admin` as username and password to login `Filebrowser` for the first time. And use `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
|
||||
|
||||
### Full features run
|
||||
|
||||
@@ -83,7 +86,7 @@ File Browser
|
||||
-e DOMAIN=https://example.com \
|
||||
-e ARIA2_SSL=false \
|
||||
-e ARIA2_USER=user \
|
||||
-e ARIA2_PWD=pwd \
|
||||
-e ARIA2_PWD=password \
|
||||
-e ARIA2_EXTERNAL_PORT=443 \
|
||||
-v /yourdata:/data \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
@@ -115,6 +118,7 @@ Then simply run `docker-compose up -d`, that's it!
|
||||
### Supported Environment Variables
|
||||
|
||||
* ENABLE_AUTH whether to enable Basic auth
|
||||
* ENABLE_RCLONE whether to disable Rclone, if you running this container offline or do not have stable connection to Github, please set to `false`
|
||||
* ARIA2_USER Basic Auth username, Rclone GUI uses it as well.
|
||||
* ARIA2_PWD Basic Auth password, Rclone GUI uses it as well.
|
||||
* ARIA2_EXTERNAL_PORT The Aria2 port which exposed to public to access to
|
||||
@@ -144,8 +148,8 @@ docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com
|
||||
```
|
||||
## Build the image by yourself
|
||||
|
||||
```
|
||||
docker build -t aria2-ui .
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
## Docker Hub
|
||||
|
||||
+19
-19
@@ -1,30 +1,30 @@
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
redir /ui /ui/ 301
|
||||
redir /rclone /rclone/ 301
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy http://localhost:5572
|
||||
}
|
||||
|
||||
route /ui/* {
|
||||
uri strip_prefix /ui
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
}
|
||||
|
||||
basicauth /ui/* {
|
||||
basicauth / {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "wahyd4/aria2-ariang-docker demo",
|
||||
"description": "A demo of Aria2 + AriaNg + Filebrowser + Rclone",
|
||||
"repository": "https://github.com/wahyd4/aria2-ariang-docker",
|
||||
"keywords": ["docker", "aria2", "rclone", "fllebrowser", "ariang"],
|
||||
"stack": "container",
|
||||
"success_url": "/",
|
||||
"env": {
|
||||
"ENABLE_AUTH": {
|
||||
"description": "This value must be heroku when running in Heroku",
|
||||
"value": "heroku",
|
||||
"required": false
|
||||
},
|
||||
"ARIA2_USER": {
|
||||
"description": "Username to login to AriaNg",
|
||||
"value": "user",
|
||||
"required": false
|
||||
},
|
||||
"ARIA2_PWD": {
|
||||
"description": "Password to login to AriaNg",
|
||||
"value": "password",
|
||||
"required": false
|
||||
},
|
||||
"ARIA2_EXTERNAL_PORT": {
|
||||
"description": "External port for apps, it should be 443 when running in Heroku",
|
||||
"value": "443",
|
||||
"required": false
|
||||
},
|
||||
"PUID": {
|
||||
"description": "The Linux user's ID that to run the app",
|
||||
"value": "0",
|
||||
"required": false
|
||||
},
|
||||
"PGID": {
|
||||
"description": "The Linux group's ID that to run the app",
|
||||
"value": "0",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
FROM arm32v6/alpine:latest
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=http://localhost
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
ENV ARIA2_EXTERNAL_PORT=80
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
ENV CADDYPATH=/app
|
||||
ENV RCLONE_CONFIG=/app/conf/rclone.conf
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
|
||||
&& caddy_tag=2.2.1 \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& tar -zxvf caddy_*.tar.gz \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf caddy_*.tar.gz \
|
||||
&& filebrowser_version=v2.7.0 \
|
||||
&& platform=linux-armv6 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md \
|
||||
&& 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 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/v1.53.1/rclone-v1.53.1-linux-arm.zip \
|
||||
&& unzip rclone-*.zip \
|
||||
&& cd rclone-* \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/rclone-*.zip \
|
||||
&& rm -rf /app/rclone-*
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD conf /app/conf
|
||||
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.6 \
|
||||
&& 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
|
||||
|
||||
#The folder to store ssl keys
|
||||
VOLUME /app/conf/key
|
||||
# User downloaded files
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["./start.sh"]
|
||||
@@ -1,71 +0,0 @@
|
||||
FROM arm64v8/alpine:latest
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=http://localhost
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
ENV ARIA2_EXTERNAL_PORT=80
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
ENV CADDYPATH=/app
|
||||
ENV RCLONE_CONFIG=/app/conf/rclone.conf
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
|
||||
&& caddy_tag=2.2.1 \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& tar -zxvf caddy_*.tar.gz \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf caddy_*.tar.gz \
|
||||
&& filebrowser_version=v2.7.0 \
|
||||
&& platform=linux-arm64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md \
|
||||
&& 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 \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/v1.53.1/rclone-v1.53.1-linux-arm.zip \
|
||||
&& unzip rclone-*.zip \
|
||||
&& cd rclone-* \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/rclone-*.zip \
|
||||
&& rm -rf /app/rclone-*
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD conf /app/conf
|
||||
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.6 \
|
||||
&& 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
|
||||
|
||||
#The folder to store ssl keys
|
||||
VOLUME /app/conf/key
|
||||
# User downloaded files
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["./start.sh"]
|
||||
@@ -1,17 +1,31 @@
|
||||
#! /bin/bash -eu
|
||||
|
||||
echo "Run aria2c and ariaNG"
|
||||
if [ "$ENABLE_AUTH" = "true" ]; then
|
||||
|
||||
echo "**** Generate basic auth password for caddy ****"
|
||||
ARIA2_PWD_ENCRYPT=$(caddy hash-password -plaintext ${ARIA2_PWD})
|
||||
|
||||
case $ENABLE_AUTH in
|
||||
true)
|
||||
echo "Using Basic Auth config file "
|
||||
export CADDY_FILE=/usr/local/caddy/SecureCaddyfile
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' ${CADDY_FILE}
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' ${CADDY_FILE}
|
||||
;;
|
||||
|
||||
echo "**** generate basic auth password for caddy ****"
|
||||
ARIA2_PWD_ENCRYPT=`caddy hash-password -plaintext ${ARIA2_PWD}`
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
else
|
||||
heroku)
|
||||
echo "Running in Heroku mode"
|
||||
export CADDY_FILE=/usr/local/caddy/HerokuCaddyfile
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' ${CADDY_FILE}
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' ${CADDY_FILE}
|
||||
|
||||
sed -i 's/PORT/'"${PORT}"'/g' ${CADDY_FILE}
|
||||
|
||||
;;
|
||||
*)
|
||||
echo "Using caddy without Basic Auth"
|
||||
export CADDY_FILE=/usr/local/caddy/Caddyfile
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
/usr/local/bin/caddy run -config ${CADDY_FILE} -adapter=caddyfile
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
build:
|
||||
docker:
|
||||
web: Dockerfile
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#! /bin/sh -eux
|
||||
|
||||
echo "Set variables for $(arch)"
|
||||
|
||||
caddy_version=2.4.1
|
||||
filebrowser_version=v2.15.0
|
||||
rclone_version=v1.55.0
|
||||
ariang_version=1.2.1
|
||||
|
||||
case "$(arch)" in
|
||||
|
||||
x86_64)
|
||||
platform=linux-amd64
|
||||
caddy_file=caddy_${caddy_version}_linux_amd64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
armv7l)
|
||||
platform=linux-armv7
|
||||
caddy_file=caddy_${caddy_version}_linux_armv7.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-linux-arm-v7.zip
|
||||
forego_file=forego-stable-linux-arm.tgz
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
platform=linux-arm64
|
||||
caddy_file=caddy_${caddy_version}_linux_arm64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "unsupported arch $(arch), exit now"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
filebrowser_file=${platform}-filebrowser.tar.gz
|
||||
ariang_file=AriaNg-${ariang_version}.zip
|
||||
|
||||
adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar mailcap --no-cache \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_version}/${caddy_file} \
|
||||
&& tar -zxf ${caddy_file} \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf ${caddy_file} \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${filebrowser_file} \
|
||||
&& tar -zxf ${filebrowser_file} \
|
||||
&& rm -rf ${filebrowser_file} \
|
||||
&& rm LICENSE README.md CHANGELOG.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/${forego_file} \
|
||||
&& tar -zxf ${forego_file} \
|
||||
&& rm -rf ${forego_file} \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/${rclone_version}/${rclone_file} \
|
||||
&& unzip ${rclone_file} \
|
||||
&& cd rclone-* \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/${rclone_file} \
|
||||
&& rm -rf /app/rclone-* \
|
||||
&& mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${ariang_version}/${ariang_file} \
|
||||
&& unzip ${ariang_file} \
|
||||
&& rm -rf ${ariang_file} \
|
||||
&& chmod -R 755 /usr/local/www/aria2 \
|
||||
@@ -1,9 +1,14 @@
|
||||
#! /bin/bash -eu
|
||||
|
||||
echo "Start Rclone"
|
||||
rclone rcd --rc-web-gui \
|
||||
--rc-web-gui-no-open-browser \
|
||||
--rc-addr :5572 \
|
||||
--rc-user $ARIA2_USER \
|
||||
--rc-pass $ARIA2_PWD \
|
||||
--cache-dir /app/.cache
|
||||
if [ "$ENABLE_RCLONE" = "true" ]; then
|
||||
echo "Start Rclone, please make sure you can connect to Github website. if not, please set docker env ENABLE_RCLONE=false"
|
||||
rclone rcd --rc-web-gui \
|
||||
--rc-web-gui-no-open-browser \
|
||||
--rc-addr :5572 \
|
||||
--rc-user $ARIA2_USER \
|
||||
--rc-pass $ARIA2_PWD \
|
||||
--cache-dir /app/.cache
|
||||
else
|
||||
echo "Skip starting Rclone as it's been disabled"
|
||||
sleep 3650d
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user