1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00

update aria2

This commit is contained in:
kev 2015-08-04 21:32:50 +08:00
parent 4d5dc112c7
commit 9470eef015
5 changed files with 44 additions and 28 deletions

View File

@ -11,31 +11,13 @@ RUN apk add -U aria2 \
&& chmod +x /usr/local/bin/gosu \
&& adduser -D aria2
ENV CRT /etc/aria2/server.crt
ENV KEY /etc/aria2/server.key
ENV TOKEN 00000000-0000-0000-0000-000000000000
ENV ULIMIT 0
ENV DLIMIT 0
ENV RSEED 1.0
ENV TSEED 0
EXPOSE 6800
COPY aria2.conf /etc/aria2/
VOLUME /home/aria2 /etc/aria2
CMD chown -R aria2:aria2 /home/aria2 \
&& gosu aria2 aria2c --disable-ipv6 \
--enable-rpc \
--rpc-listen-all \
--rpc-listen-port=6800 \
--rpc-allow-origin-all \
--rpc-secure \
--rpc-certificate=${CRT} \
--rpc-private-key=${KEY} \
--rpc-secret=${TOKEN} \
--max-upload-limit=${ULIMIT} \
--max-download-limit=${DLIMIT} \
--seed-ratio=${RSEED} \
--seed-time=${TSEED} \
--dir=/home/aria2
ENV TOKEN 00000000-0000-0000-0000-000000000000
CMD chown -R aria2:aria2 /home/aria2 \
&& gosu aria2 aria2c --conf-path=/etc/aria2/aria2.conf \
--rpc-secret=${TOKEN}
EXPOSE 6800

View File

@ -35,7 +35,8 @@ aria2:
- "6800:6800"
volumes:
- "data:/home/aria2"
- "keys:/etc/aria2"
- "keys:/etc/aria2/keys"
# - "aria2.conf:/etc/aria2.conf"
environment:
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
restart: always
@ -49,6 +50,25 @@ yaaw:
restart: always
```
## aria2.conf
```
dir=/home/aria2
disable-ipv6=true
enable-rpc=true
max-download-limit=0
max-upload-limit=0
rpc-allow-origin-all=true
rpc-certificate=/etc/aria2/keys/server.crt
rpc-listen-all=true
rpc-listen-port=6800
rpc-private-key=/etc/aria2/keys/server.key
rpc-secret=00000000-0000-0000-0000-000000000000
rpc-secure=true
seed-ratio=0
seed-time=0
```
## server
```

14
aria2/aria2.conf Normal file
View File

@ -0,0 +1,14 @@
dir=/home/aria2
disable-ipv6=true
enable-rpc=true
max-download-limit=0
max-upload-limit=0
rpc-allow-origin-all=true
rpc-certificate=/etc/aria2/keys/server.crt
rpc-listen-all=true
rpc-listen-port=6800
rpc-private-key=/etc/aria2/keys/server.key
rpc-secret=00000000-0000-0000-0000-000000000000
rpc-secure=true
seed-ratio=0
seed-time=0

View File

@ -4,7 +4,7 @@ aria2:
- "6800:6800"
volumes:
- "data:/home/aria2"
- "keys:/etc/aria2"
- "keys:/etc/aria2/keys"
environment:
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
restart: always

View File

@ -1,5 +1,5 @@
dokuwiki:
image: vimagick/dokuwiki:latest
image: vimagick/dokuwiki
ports:
- "8000:80"
restart: always