From 9470eef0158baeca5dc53afe38eff553a404254b Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 4 Aug 2015 21:32:50 +0800 Subject: [PATCH] update aria2 --- aria2/Dockerfile | 32 +++++++------------------------- aria2/README.md | 22 +++++++++++++++++++++- aria2/aria2.conf | 14 ++++++++++++++ aria2/docker-compose.yml | 2 +- dokuwiki/docker-compose.yml | 2 +- 5 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 aria2/aria2.conf diff --git a/aria2/Dockerfile b/aria2/Dockerfile index 5cfab73..5169049 100644 --- a/aria2/Dockerfile +++ b/aria2/Dockerfile @@ -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 diff --git a/aria2/README.md b/aria2/README.md index 7f880d0..df12131 100644 --- a/aria2/README.md +++ b/aria2/README.md @@ -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 ``` diff --git a/aria2/aria2.conf b/aria2/aria2.conf new file mode 100644 index 0000000..36492f9 --- /dev/null +++ b/aria2/aria2.conf @@ -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 diff --git a/aria2/docker-compose.yml b/aria2/docker-compose.yml index f6ca1bb..08b63a4 100644 --- a/aria2/docker-compose.yml +++ b/aria2/docker-compose.yml @@ -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 diff --git a/dokuwiki/docker-compose.yml b/dokuwiki/docker-compose.yml index 86f072e..0c30b3f 100644 --- a/dokuwiki/docker-compose.yml +++ b/dokuwiki/docker-compose.yml @@ -1,5 +1,5 @@ dokuwiki: - image: vimagick/dokuwiki:latest + image: vimagick/dokuwiki ports: - "8000:80" restart: always