Dht issue (#211)

* Move .aria2/dht.dat file to /app folder to solve the issue failed to save dht.dat

* Add env CADDY_LOG_LEVEL to allow user override log levels
This commit is contained in:
2022-04-19 11:04:22 +10:00
committed by GitHub
parent a20300c9ea
commit 46fd0a842f
5 changed files with 26 additions and 14 deletions
+5 -7
View File
@@ -1,9 +1,10 @@
#{
# auto_https off
#}
{$DOMAIN}
log {
level {env.CADDY_LOG_LEVEL}
output stderr
}
redir /ui / 301
redir /ui/ / 301
redir /rclone /rclone/ 301
@@ -29,6 +30,3 @@ root * /usr/local/www/aria2
file_server
encode gzip
log {
output stderr
}
+9 -4
View File
@@ -31,8 +31,10 @@ ENV CADDYPATH=/app
ENV RCLONE_CONFIG=/app/conf/rclone.conf
ENV XDG_DATA_HOME=/app/.caddy/data
ENV XDG_CONFIG_HOME=/app/.caddy/config
ENV XDG_CACHE_HOME=/app/.cache
ENV RCLONE_CONFIG_BASE64=""
ENV ENABLE_APP_CHECKER=true
ENV CADDY_LOG_LEVEL=INFO
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
@@ -44,13 +46,16 @@ RUN ./install.sh
RUN rm ./install.sh
# folder for storing ssl keys
VOLUME /app/conf/key
# For config files
VOLUME /app/conf/
# file downloading folder
# For file downloading
VOLUME /data
EXPOSE 80 443
# For rclone cache and aria2 DHT files
VOLUME /app/.cache
EXPOSE 80 443 6881
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost/ping || exit 1
+5 -3
View File
@@ -1,5 +1,10 @@
{$DOMAIN}
log {
level {env.CADDY_LOG_LEVEL}
output stderr
}
basicauth / {
ARIA2_USER ARIA2_PWD_ENCRYPT
}
@@ -29,6 +34,3 @@ root * /usr/local/www/aria2
file_server
encode gzip
log {
output stderr
}
+6
View File
@@ -73,3 +73,9 @@ 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
## DHT
dht-entry-point=dht.transmissionbt.com:6881
dht-entry-point=dht.vuze.com:6881
dht-entry-point=dht.libtorrent.org:25401
dht-listen-port=6881
+1
View File
@@ -6,6 +6,7 @@ usermod -o -u "$PUID" junv
mkdir -p /app/.caddy
mkdir -p /app/.cache
mkdir -p /app/.cache/aria2
chown -R junv:junv \
/app \