Compare commits

...
16 Commits
Author SHA1 Message Date
junv-repo-bot 99c036f46c Update version 2025-03-06 11:51:44 +00:00
junvandGitHub ea0dbb9e14 Add logic to allow user disable filebrowser (#245) 2025-03-06 22:49:55 +11:00
junvandGitHub 3b41b6d1e2 Bump versions (#244)
* Bump versions

* Try to fix build
2025-03-06 22:41:39 +11:00
junvandGitHub 1a16f7195d Update versions (#241) 2023-11-11 08:22:13 +11:00
junv-repo-bot 3e39cacc35 Update version 2023-09-17 23:05:00 +00:00
divyam234andGitHub 6c3caac687 fix sed escaping (#239) 2023-09-18 08:52:04 +10:00
junv-repo-bot f400b16be3 Update version 2023-05-23 04:53:03 +00:00
junvandGitHub 8fbc2bb854 Add runit to fix chpst error (#237) 2023-05-22 13:52:41 +10:00
junvandGitHub e1c398c9d3 Try to make docker imager a bit smaller by removing unnecessary packages (#236) 2023-05-22 12:14:16 +10:00
junvandGitHub c3a5fda0a7 Switch to debian, which might fix some weired issues in RasberryPi (#235) 2023-05-21 19:50:04 +10:00
junvandGitHub a6c4ab584d Update README.md and not to recommend using 80 port 2023-05-04 09:20:33 +10:00
junv-repo-bot c81da61cec Update version 2023-04-20 05:07:37 +00:00
junvandGitHub 1e6c8855da Add ability to skip chown /data folder (#233)
* Add env FIX_DATA_VOLUME_PERMISSIONS to allow user to choose whether to chown the data folder

* Add another log
2023-04-20 13:38:50 +10:00
junvandGitHub 7597acf095 Minor readme correction 2023-04-14 15:56:40 +10:00
junvandGitHub 2f63249629 Update readme 2023-04-14 15:55:08 +10:00
junv-repo-bot b07e1388a4 Update version 2023-04-12 23:27:51 +00:00
9 changed files with 52 additions and 28 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ jobs:
uses: docker/setup-buildx-action@v1
-
name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache
+1 -1
View File
@@ -1 +1 @@
5.2.1
6.1.1
+6 -4
View File
@@ -1,6 +1,6 @@
FROM golang:alpine AS build-forego
FROM golang AS build-forego
RUN apk add --no-cache git openssh
RUN apt update && apt install -y git
WORKDIR /app
@@ -11,7 +11,7 @@ RUN git clone https://github.com/wahyd4/forego.git \
&& go build -o forego \
&& chmod +x forego
FROM alpine:edge
FROM debian:stable-slim
LABEL AUTHOR=Junv<wahyd4@gmail.com>
@@ -34,13 +34,15 @@ ENV XDG_CONFIG_HOME=/app/.caddy/config
ENV XDG_CACHE_HOME=/app/.cache
ENV RCLONE_CONFIG_BASE64=""
ENV ENABLE_APP_CHECKER=true
ENV ENABLE_FILEBROWSER=true
ENV CADDY_LOG_LEVEL=INFO
ENV RCLONE_AUTO_UPLOAD_PROVIDER=
ENV RCLONE_AUTO_UPLOAD_REMOTE_PATH=/downloads
ENV RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE=1K
ENV RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE=100G
ENV FIX_DATA_VOLUME_PERMISSIONS=false
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh new-version-checker.sh APP_VERSION /app/
ADD install.sh aria2c.sh caddy.sh filebrowser.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/
+1 -1
View File
@@ -1,5 +1,5 @@
caddy: /app/caddy.sh
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
filebrowser: /app/filebrowser.sh
aria2c: /app/aria2c.sh
rclone: /app/rclone.sh
newer_version_checker: /app/new-version-checker.sh
+7 -5
View File
@@ -68,12 +68,12 @@ File Browser
### Quick run
```shell
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
docker run -d --name aria2-ui -p 8000:80 wahyd4/aria2-ui
```
* Aria2: <http://yourip>
* FileManger: <http://yourip/files>
* Rclone: <http://yourip/rclone>
* Aria2: <http://yourip:8000>
* FileManger: <http://yourip:8000/files>
* Rclone: <http://yourip:8000/rclone>
* 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
@@ -139,6 +139,7 @@ Then simply run `docker-compose up -d`, that's it!
| `RCLONE_AUTO_UPLOAD_REMOTE_PATH` | The file folder in remote cloud storage provider, default `/downloads`|
| `RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE` | Set the minimum file size of auto uploader, files smaller than it won't be uploaded, default `1K` |
| `RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE` | Set the limit of the Max file can be uploaded to 3rd party storage provider, default `100G`. |
| `FIX_DATA_VOLUME_PERMISSIONS` | Default value is `false`. When set to `true`, the container will run `chown -R` command against `/data` folder and `PUID` and `PGID` you set. Please set it to `true` when container complains you don't have enough permissions to manage the files and folders you mounted.|
### Supported Volumes
@@ -147,7 +148,7 @@ Then simply run `docker-compose up -d`, that's it!
|:---|:---|
| `/data` | The folder contains all the files you download. |
| `/app/conf/key` | The folder which stores 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` | 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. Please put your `rclone.conf` in this folder as well if you'd mount it to Rclone. So all the config files supported in this folder are: `aria2.conf`, `aria2.session`, `rclone.conf`. 🚨Warning🚨: if you don't mount `/app/conf`, whenever the container restarts, you'll lose your downloading progress. |
| `/app/conf` | The Aria2 configuration and file session folder. 🚨Please make sure you have `aria2.conf` and `aria2.session` file exist on your host, when yout mount /app/conf. 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. Please put your `rclone.conf` in this folder as well if you'd mount it to Rclone. So all the config files supported in this folder are: `aria2.conf`, `aria2.session`, `rclone.conf`. 🚨Warning🚨: if you don't mount `/app/conf`, whenever the container restarts, you'll lose your downloading progress. |
|`/app/conf/aria2.conf` | See description above👆🏼 |
|`/app/conf/aria2.session` | See description above👆🏼 |
|`/app/conf/rclone.conf` | See description above👆🏼 |
@@ -206,3 +207,4 @@ I couldn't tell you how to run it in Kubernetes step by step, but once you have
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.
4. How can I get `Rclone` authenticated? Due to Rclone is running in this docker image only as a component rather than an application, you can only interact with it via `/rclone` endpoint, and no other ports. So the web browser authentication mechanism doesn't work here. Please configure Rclone through command line within the container. You can follow the official doc [Configuring rclone on a remote / headless machine](https://rclone.org/remote_setup) or this [issue](https://github.com/wahyd4/aria2-ariang-docker/issues/118)
5. Why the app stopped working when I have `- v /<some-folder>:/app/conf` mounted. It happens when you mount the entire `/app/conf` folder but you don't have any files under that folder on your host. To fix this issue, please simply copy all files under [`conf`](https://github.com/wahyd4/aria2-ariang-docker/tree/master/conf) folder to your local folder that you mount to `/app/conf` and then rerun the container.
+4 -4
View File
@@ -9,15 +9,15 @@ case $ENABLE_AUTH in
true)
echo "[INFO] Use 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}
sed -i "s#ARIA2_USER#${ARIA2_USER}#g" ${CADDY_FILE}
sed -i "s#ARIA2_PWD_ENCRYPT#${ARIA2_PWD_ENCRYPT}#g" ${CADDY_FILE}
;;
heroku)
echo "[INFO] Run Caddy with 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#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}
Executable
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash -eu
echo "Checking if FileBrowser is enabled..."
if [ "$ENABLE_FILEBROWSER" = "true" ]; then
echo "Starting FileBrowser..."
/app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
else
echo "FileBrowser is disabled. Set ENABLE_FILEBROWSER=true to enable it."
fi
+10 -3
View File
@@ -8,17 +8,24 @@ mkdir -p /app/.caddy
mkdir -p /app/.cache
mkdir -p /app/.cache/aria2
echo "[INFO] Run chown against app related folders and user ${PUID}"
chown -R junv:junv \
/app \
/app/.caddy \
/app/.cache \
/usr/local \
/var/log \
/data
/var/log
if [[ "${FIX_DATA_VOLUME_PERMISSIONS}" = "true" ]]; then
echo "[INFO] Setup user ${PUID} proper permissions for /data"
chown -R junv:junv /data
fi
chmod +x /app/caddy.sh \
/app/rclone.sh \
/app/aria2c.sh
/app/aria2c.sh \
/app/filebrowser.sh
echo "[INFO] Give caddy permissions to use low ports"
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
+12 -9
View File
@@ -2,10 +2,10 @@
echo "[INFO] Set variables for $(arch)"
caddy_version=2.6.4
filebrowser_version=v2.23.0
rclone_version=v1.62.2
ariang_version=1.3.4
caddy_version=2.9.1
filebrowser_version=v2.32.0
rclone_version=v1.69.1
ariang_version=1.3.10
case "$(arch)" in
@@ -34,10 +34,10 @@ 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 fuse vim libcap --no-cache \
groupadd junv \
&& useradd -g junv -m -s /bin/bash junv \
&& apt update \
&& apt install -y wget curl aria2 tar unzip libcap2-bin runit\
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_version}/${caddy_file} \
&& tar -zxf ${caddy_file} \
&& mv caddy /usr/local/bin/ \
@@ -65,6 +65,9 @@ adduser -D -u 1000 junv \
&& unzip ${ariang_file} \
&& rm -rf ${ariang_file} \
&& chmod -R 755 /usr/local/www/aria2 \
&& mkdir -p /data && chown junv:junv /data \
&& mkdir -p /data/cloud \
&& chown junv:junv /data/cloud \
&& ln -s /data/cloud /app
&& ln -s /data/cloud /app \
&& apt remove -y unzip\
&& apt clean