Compare commits

...
23 Commits
Author SHA1 Message Date
junvandGitHub 1bd477d89e Upgrade file browser to 2.21.1 and rclone to 1.58 (#208)
* Upgrade file browser to 2.21.1

* Upgrade rclone to 1.58
2022-04-15 22:34:17 +10:00
junvandGitHub 337511813d Remove deploy to heroku button, due to this docker image has been banned by Heroku (#205) 2022-04-12 16:47:09 +10:00
junvandGitHub c4a5f82641 Update README.CN.md 2022-04-06 12:05:26 +10:00
junvandGitHub c2adb8c41e Update README.md 2022-04-06 12:03:45 +10:00
junv-repo-bot ff54b5b92c Update version 2022-03-25 08:51:24 +00:00
junvandGitHub c47b5d19e6 Fix forego compile error (#203) 2022-03-25 19:47:52 +11:00
junv-repo-bot 5108254f44 Update version 2022-03-09 07:51:43 +00:00
junvandGitHub d12c6f7ea2 Refine the health point to return current app version, just for debuging issues (#200) 2022-03-09 18:48:23 +11:00
junv-repo-bot aa1db00ca1 Update version 2022-03-08 11:52:43 +00:00
junvandGitHub 4485fd0437 Fix #197 health check issue when basic auth enabled (#198) 2022-03-08 22:49:32 +11:00
junv-repo-bot a8db9193f8 Update version 2022-01-27 05:38:55 +00:00
junvandGitHub bc90a2992c Update dependencies to the latest version (#191) 2022-01-27 16:35:50 +11:00
junv-repo-bot 50512b4183 Update version 2021-12-11 08:50:30 +00:00
junvandGitHub 8d1a326a23 Add environment variable to allow user disable new version checking (#187) 2021-12-11 19:47:01 +11:00
junv-repo-bot 534b94a31f Update version 2021-10-24 07:01:01 +00:00
junvandGitHub cc16fa5b0b Add aria2 download hook example (#182) 2021-10-24 17:57:57 +11:00
junv-repo-bot 76789658e5 Update version 2021-10-13 13:01:30 +00:00
junv 59c67bad8c Update the app version before build docker containers 2021-10-13 23:57:22 +11:00
junv-repo-bot c2881479a9 Update version 2021-10-13 12:51:45 +00:00
junvandGitHub 1f4a331147 Refine the logic of app new version checker (#181) 2021-10-13 23:48:37 +11:00
junv-repo-bot 461f0e9451 Update version 2021-10-13 12:22:50 +00:00
junv 381e7a760c github action fix 2021-10-13 23:10:55 +11:00
junvandGitHub 56190aea72 Add new version checker (#180)
* Add logic to allow user check new version

* update action
2021-10-13 23:01:35 +11:00
14 changed files with 117 additions and 43 deletions
+20 -3
View File
@@ -13,6 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
-
name: Update APP VERSION
if: contains(github.ref, '/tags/v')
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo $VERSION > APP_VERSION
-
name: Prepare
id: prepare
@@ -72,14 +78,25 @@ jobs:
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 }}
- name: Update tag
-
name: Commit changes
if: contains(github.ref, '/tags/v')
uses: EndBug/add-and-commit@v7
with:
author_name: junv-repo-bot
author_email: me@toozhao.com
message: 'Update version'
add: 'APP_VERSION'
push: true
branch: master
-
name: Update tag
if: contains(github.ref, '/tags/v')
env:
API_KEY: ${{ secrets.BadgeAPIKey }}
run: |
VERSION=${GITHUB_REF#refs/tags/v}
curl -XPUT -D- 'https://badges.toozhao.com/val/aria2-ui-docker' \
curl --max-time 6 -XPUT -D- 'https://badges.toozhao.com/val/aria2-ui-docker' \
-H 'Content-Type: application/json' \
-H 'API_KEY': ${API_KEY} \
-d '{"value": "'${VERSION}'"}' || true
+1
View File
@@ -0,0 +1 @@
4.13.2
+9 -5
View File
@@ -12,13 +12,17 @@ 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
uri strip_prefix /rclone
reverse_proxy 127.0.0.1:5572
}
route /files/* {
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
}
route /ping {
respond "app version: {env.APP_VERSION}"
}
root * /usr/local/www/aria2
@@ -26,5 +30,5 @@ file_server
encode gzip
log {
output stderr
output stderr
}
+5 -6
View File
@@ -6,9 +6,7 @@ WORKDIR /app
RUN git clone https://github.com/wahyd4/forego.git \
&& cd forego \
&& git checkout 20180216151118 \
&& go mod init \
&& go mod vendor \
&& git checkout fix-go-mod \
&& go mod download \
&& go build -o forego \
&& chmod +x forego
@@ -34,8 +32,9 @@ ENV RCLONE_CONFIG=/app/conf/rclone.conf
ENV XDG_DATA_HOME=/app/.caddy/data
ENV XDG_CONFIG_HOME=/app/.caddy/config
ENV RCLONE_CONFIG_BASE64=""
ENV ENABLE_APP_CHECKER=true
ADD install.sh 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 new-version-checker.sh APP_VERSION /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile HerokuCaddyfile /usr/local/caddy/
@@ -53,7 +52,7 @@ VOLUME /data
EXPOSE 80 443
HEALTHCHECK --interval=1m --timeout=3s \
CMD curl -f http://localhost || exit 1
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost/ping || exit 1
CMD ["./start.sh"]
+12 -9
View File
@@ -1,13 +1,12 @@
{
debug
admin off
auto_https off
admin off
auto_https off
}
:PORT
basicauth / {
ARIA2_USER ARIA2_PWD_ENCRYPT
ARIA2_USER ARIA2_PWD_ENCRYPT
}
redir /ui / 301
@@ -18,13 +17,17 @@ 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
uri strip_prefix /rclone
reverse_proxy 127.0.0.1:5572
}
route /files/* {
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
}
route /ping {
respond "app version: {env.APP_VERSION}"
}
root * /usr/local/www/aria2
@@ -32,5 +35,5 @@ file_server
encode gzip
log {
output stderr
output stderr
}
+1
View File
@@ -2,3 +2,4 @@ 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
newer_version_checker: /app/new-version-checker.sh
+5 -3
View File
@@ -6,11 +6,11 @@ Aria2 + AriaNg
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
[![Page Views Count](https://badges.toozhao.com/badges/01EJ791D8BB43PDS8D7PP7H0YE/green.svg)](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"/>
@@ -44,7 +44,7 @@ File Browser
* 自动 HTTPS Let's Encrypt
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
* Basic Auth 用户认证
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.org/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 支持ARM CPU 架构,因此可以在树莓派等设备上运行,
## 推荐使用的docker image tag
@@ -116,6 +116,8 @@ services:
* `RPC_SECRET` Aria2 RPC 加密 token
* `DOMAIN` 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
* `RCLONE_CONFIG_BASE64` 通过`base64` 字符串的形式配置rclone.conf。主要给在Heroku平台上运行时使用,请使用命令行 `cat /app/conf/rclone.conf | base64` 或者其他任何在线base64在线工具 [比如这个](https://www.base64encode.org/)来把`rclone.conf`的内容生成`base64`字符串。在使用本环境变量的同时,请确保`ENABLE_RCLONE`设置为`true`
* `ENABLE_APP_CHECKER`,默认情况下本程序会每天向远程服务器发送一次GET请求,以检查是否有新版本的镜像。该功能可以让你及时获取新功能和相关安全隐患的修复的推送提醒。你也可以选择将该环境变量设置为`false`来禁用该功能。注意该功能启用下,依然需要手动更新镜像来完成升级。
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
+3 -4
View File
@@ -6,13 +6,11 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
[![Page Views Count](https://badges.toozhao.com/svg/aria2-ariang-docker)](https://badges.toozhao.com/stats/aria2-ariang-docker "Page Views Count")
**If you like this project, please consider support me / 如果喜欢本项目,请考虑打赏,谢谢!**
**If you like this project, please consider [sponsoring me](https://github.com/sponsors/wahyd4) / 如果喜欢本项目,请考虑打赏,谢谢!**
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
@@ -47,7 +45,7 @@ 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
* [File Browser](https://filebrowser.org/): 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
@@ -127,6 +125,7 @@ Then simply run `docker-compose up -d`, that's it!
* `RPC_SECRET` The Aria2 RPC secret token
* `DOMAIN` The domain you'd like to bind, when domain is a `https://` thing, then auto TLS feature will be enabled
* `RCLONE_CONFIG_BASE64` Inject and config Rclone through `base64` string, which is the only way to use Rclone on Heroku. Please use `cat /app/conf/rclone.conf | base64` or any base64 online tools such as [this](https://www.base64encode.org/) to encode your `rclone.conf` as bse64 string. Note, you need to set `ENABLE_RCLONE` to true as well.
* `ENABLE_APP_CHECKER`, by default it's set to `true` to check if any new docker image version release on daily basis, which can help you get notification when new features released as well as some security vulnerabilities get fixed. You can set it to `false` to disable this feature. Note: you still need to manually pull the new image version and re run the docker container to complete upgrading.
### Supported Volumes
+10 -7
View File
@@ -1,8 +1,7 @@
{$DOMAIN}
basicauth / {
ARIA2_USER ARIA2_PWD_ENCRYPT
ARIA2_USER ARIA2_PWD_ENCRYPT
}
redir /ui / 301
@@ -13,13 +12,17 @@ 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
uri strip_prefix /rclone
reverse_proxy 127.0.0.1:5572
}
route /files/* {
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
uri strip_prefix /files
reverse_proxy 127.0.0.1:8080
}
route /ping {
respond "app version: {env.APP_VERSION}"
}
root * /usr/local/www/aria2
@@ -27,5 +30,5 @@ file_server
encode gzip
log {
output stderr
output stderr
}
+5
View File
@@ -0,0 +1,5 @@
#! /bin/bash -eu
# For more details about how to use this feature, see: https://aria2.github.io/manual/en/html/aria2c.html#event-hook
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Aria2 hook triggered with parameters: GID [$1], Files Count: [$2], Files Path: [$3]"
+8 -2
View File
@@ -54,10 +54,10 @@ disable-ipv6=true
# General Options
log=/var/log/aria2.log
#You can set either debug, info, notice, warn or error.
log-level=notice
log-level=warn
## 进度保存相关 ##
## Related to save downloading progress ##
# 从会话文件中读取下载任务
input-file=/app/conf/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
@@ -67,3 +67,9 @@ save-session-interval=10
# BT trackers from https://trackerslist.com/best.txt updated on 2021-06-06
bt-tracker=http://1337.abcvg.info:80/announce,http://nyaa.tracker.wf:7777/announce,http://opentracker.xyz:80/announce,http://rt.tace.ru:80/announce,http://share.camoe.cn:8080/announce,http://t.nyaatracker.com:80/announce,http://torrentsmd.com:8080/announce,http://tr.cili001.com:8070/announce,http://tracker-cdn.moeking.me:2095/announce,http://tracker.anirena.com:80/announce,http://tracker.anirena.com:80/b16a15d9a238d1f59178d3614b857290/announce,http://tracker.anonwebz.xyz:8080/announce,http://tracker.bt4g.com:2095/announce,http://tracker.files.fm:6969/announce,http://tracker.gbitt.info:80/announce,http://tracker.ipv6tracker.ru:80/announce,http://tracker.noobsubs.net:80/announce,http://tracker.shittyurl.org:80/announce,http://tracker.tfile.co:80/announce,http://tracker.tfile.me:80/announce,http://tracker.trackerfix.com:80/announce,http://vps02.net.orel.ru:80/announce,https://1337.abcvg.info:443/announce,https://tr.torland.ga:443/announce,https://tracker.coalition.space:443/announce,https://tracker.gbitt.info:443/announce,https://tracker.lilithraws.cf:443/announce,https://tracker.nanoha.org:443/announce,https://tracker.nitrix.me:443/announce,https://tracker.parrotsec.org:443/announce,https://tracker.shittyurl.org:443/announce,https://tracker.tamersunion.org:443/announce,https://w.wwwww.wtf:443/announce,udp://6rt.tace.ru:80/announce,udp://9.rarbg.com:2830/announce,udp://9.rarbg.me:2710/announce,udp://9.rarbg.to:2710/announce,udp://app.icon256.com:8000/announce,udp://bubu.mapfactor.com:6969/announce,udp://discord.heihachi.pw:6969/announce,udp://exodus.desync.com:6969/announce,udp://explodie.org:6969/announce,udp://fe.dealclub.de:6969/announce,udp://inferno.demonoid.is:3391/announce,udp://ipv6.tracker.zerobytes.xyz:16661/announce,udp://mail.realliferpg.de:6969/announce,udp://movies.zsw.ca:6969/announce,udp://mts.tvbit.co:6969/announce,udp://open.demonii.com:1337/announce,udp://open.stealth.si:80/announce,udp://opentor.org:2710/announce,udp://opentracker.i2p.rocks:6969/announce,udp://p4p.arenabg.ch:1337/announce,udp://p4p.arenabg.com:1337/announce,udp://pow7.com:80/announce,udp://retracker.hotplug.ru:2710/announce,udp://retracker.lanta-net.ru:2710/announce,udp://retracker.netbynet.ru:2710/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://t1.leech.ie:1337/announce,udp://t2.leech.ie:1337/announce,udp://thetracker.org:80/announce,udp://torrentclub.online:54123/announce,udp://tracker-de.ololosh.space:6969/announce,udp://tracker.0x.tf:6969/announce,udp://tracker.altrosky.nl:6969/announce,udp://tracker.army:6969/announce,udp://tracker.beeimg.com:6969/announce,udp://tracker.birkenwald.de:6969/announce,udp://tracker.blacksparrowmedia.net:6969/announce,udp://tracker.breizh.pm:6969/announce,udp://tracker.ccp.ovh:6969/announce,udp://tracker.cyberia.is:6969/announce,udp://tracker.dler.com:6969/announce,udp://tracker.internetwarriors.net:1337/announce,udp://tracker.moeking.me:6969/announce,udp://tracker.nrx.me:6969/announce,udp://tracker.ololosh.space:6969/announce,udp://tracker.openbittorrent.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.shkinev.me:6969/announce,udp://tracker.theoks.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.uw0.xyz:6969/announce,udp://tracker.zerobytes.xyz:1337/announce,udp://tracker0.ufibox.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker1.itzmx.com:8080/announce,udp://tracker2.dler.com:80/announce,udp://tracker2.dler.org:80/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker3.itzmx.com:6961/announce,udp://tracker4.itzmx.com:2710/announce,udp://u.wwwww.wtf:1/announce,udp://valakas.rollo.dnsabr.com:2710/announce,udp://vibe.community:6969/announce,udp://wassermann.online:6969/announce,udp://www.torrent.eu.org:451/announce
# The script to be run when download completes
on-download-complete=/app/conf/aria2-sample-hook.sh
# The script to be run when download fails
on-download-error=/app/conf/aria2-sample-hook.sh
+4 -4
View File
@@ -2,10 +2,10 @@
echo "[INFO] Set variables for $(arch)"
caddy_version=2.4.5
filebrowser_version=v2.17.2
rclone_version=v1.56.2
ariang_version=1.2.2
caddy_version=2.4.6
filebrowser_version=v2.21.1
rclone_version=v1.58.0
ariang_version=1.2.3
case "$(arch)" in
+31
View File
@@ -0,0 +1,31 @@
#! /bin/bash -u
sleep 5
if [ "$ENABLE_APP_CHECKER" = "false" ]; then
echo "[INFO] Skip checking new version"
# Do nothing and just sleep 10 years
sleep 315360000
exit 0
fi
set -e
APP_VERSION=$(cat APP_VERSION)
set +e
while true; do
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Checking for new version against ${APP_VERSION} ..."
newer_version=$(curl --max-time 6 -s "https://badges.toozhao.com/val/aria2-ui-docker?version=${APP_VERSION}&arch=$(arch)")
if [[ -z ${newer_version} ]]; then
echo "[WARN] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Failed to check new version."
sleep 86400
continue
fi
if [[ ${newer_version} > ${APP_VERSION} ]]; then
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Found newer Docker image version wahyd4/aria2-ui:${newer_version}, please consider to upgrade by using docker pull command to have better user experience."
# check new version daily
sleep 86400
continue
fi
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Congrats, you are using the latest version docker image"
sleep 86400
done
+3
View File
@@ -1,4 +1,7 @@
#!/bin/bash -eu
export APP_VERSION=$(cat /app/APP_VERSION)
if [ "$PGID" != "0" ]; then
$(dirname $0)/init.sh chpst -u junv ./forego start
else