Compare commits

...
8 Commits
Author SHA1 Message Date
junv 5429f4ebc5 Use master branch 2021-05-21 07:41:52 +10:00
junv 10d1d6e139 Add deploy to heroku button 2021-05-21 07:36:07 +10:00
junv d1d91da0de use for heroku 2021-05-21 07:25:34 +10:00
junv 346d54937b use dynamic port for heroku mode 2021-05-21 07:11:25 +10:00
junv 16f2c119b8 Correct env names for heroku 2021-04-16 16:55:45 +10:00
junv b0f68d7cc8 update heroku app.json 2021-04-16 16:49:58 +10:00
junv 6c14c22f1d add heroku.yml 2021-04-16 16:35:17 +10:00
junv b61bdcf173 Add heroku app.json 2021-04-16 16:30:15 +10:00
10 changed files with 113 additions and 14 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ ENV XDG_CONFIG_HOME=/app/.caddy/config
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 ./install.sh
+36
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
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
+4
View File
@@ -5,6 +5,10 @@ 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/)
[![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"/>
+6 -1
View File
@@ -5,8 +5,13 @@ 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/)
[![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 / 如果喜欢本项目,请考虑打赏,谢谢!**
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
@@ -42,7 +47,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.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
-3
View File
@@ -1,6 +1,3 @@
#{
# auto_https off
#}
{$DOMAIN}
+40
View File
@@ -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
}
}
}
+21 -7
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
build:
docker:
web: Dockerfile
+1 -1
View File
@@ -2,7 +2,7 @@
echo "Set variables for $(arch)"
caddy_version=2.3.0
caddy_version=2.4.1
filebrowser_version=v2.15.0
rclone_version=v1.55.0
ariang_version=1.2.1