diff --git a/aria2/Dockerfile b/aria2/Dockerfile index 26dd271..9879fcd 100644 --- a/aria2/Dockerfile +++ b/aria2/Dockerfile @@ -5,15 +5,15 @@ FROM alpine:3 MAINTAINER EasyPi Software Foundation -ENV TOKEN 00000000-0000-0000-0000-000000000000 +ENV TOKEN=00000000-0000-0000-0000-000000000000 RUN set -xe \ && apk add --no-cache aria2 \ - && aria2c https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64 -o /usr/local/bin/gosu \ + && aria2c https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 -o /usr/local/bin/gosu \ && chmod +x /usr/local/bin/gosu \ && adduser -D aria2 -COPY aria2.conf /etc/aria2/ +COPY ./data/aria2.conf /etc/aria2/ VOLUME /home/aria2 /etc/aria2 WORKDIR /home/aria2 diff --git a/aria2/README.md b/aria2/README.md index 0d98065..1ce0ba0 100644 --- a/aria2/README.md +++ b/aria2/README.md @@ -11,21 +11,21 @@ aria2 ``` ~/fig/aria2/ ├── docker-compose.yml -├── html/ -│ ├── README.md -│ ├── TODO.md -│ ├── css/... -│ ├── img/... -│ ├── index.html -│ ├── js/... -│ └── offline.appcache -├── data -> /home/aria2/ -└── keys/ - ├── server.crt - └── server.key +└── data/ + ├── html/ + │ ├── css/... + │ ├── img/... + │ ├── index.html + │ ├── js/... + │ └── offline.appcache + ├── keys/ + │ ├── server.crt + │ └── server.key + ├── disk/ -> /mnt/usb/ + └── aria2.conf ``` -> You may make `data` a symbolic link to `/home/aria2` or somewhere else. +> You may make `disk` a symbolic link to `/mnt/usb` or somewhere else. > To implement disk quota, you can even create a [virtual disk][1]. ## docker-compose.yml @@ -40,8 +40,8 @@ services: ports: - "6800:6800" volumes: - - ./data:/home/aria2 - - ./keys:/etc/aria2/keys + - ./data/disk:/home/aria2 + - ./data/keys:/etc/aria2/keys environment: - TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db restart: unless-stopped @@ -77,9 +77,9 @@ seed-time=0 ## server ```bash -$ mkdir -p ~/fig/aria2/{html,keys}/ -$ cd ~/fig/aria2/ -$ ln -s /home/aria2 data +$ mkdir -p ~/fig/aria2/data/{html,keys}/ +$ cd ~/fig/aria2/data +$ ln -s /mnt/usb disk $ curl -sSL https://github.com/binux/yaaw/archive/master.tar.gz | tar xz --strip 1 -C html $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout keys/server.key -out keys/server.crt $ vim docker-compose.yml diff --git a/aria2/aria2.conf b/aria2/data/aria2.conf similarity index 100% rename from aria2/aria2.conf rename to aria2/data/aria2.conf diff --git a/aria2/docker-compose.yml b/aria2/docker-compose.yml index bc12173..dd831d3 100644 --- a/aria2/docker-compose.yml +++ b/aria2/docker-compose.yml @@ -7,8 +7,8 @@ services: ports: - "6800:6800" volumes: - - ./data:/home/aria2 - - ./keys:/etc/aria2/keys + - ./data/var:/home/aria2 + - ./data/keys:/etc/aria2/keys environment: - TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db restart: unless-stopped @@ -18,5 +18,5 @@ services: ports: - "8080:80" volumes: - - ./html:/usr/share/nginx/html + - ./data/html:/usr/share/nginx/html restart: unless-stopped