add files

This commit is contained in:
Newnius 2020-01-29 22:58:43 +08:00
parent bdd7ab6564
commit d2207e4770
4 changed files with 110 additions and 0 deletions

16
transmission/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM alpine:3.10
MAINTAINER Newnius <newnius.cn@gmail.com>
USER root
RUN apk add --no-cache transmission-daemon
# Default Conf Files
ADD config/ /config/
WORKDIR /root
ADD bootstrap.sh /etc/bootstrap.sh
CMD ["/etc/bootstrap.sh"]

18
transmission/README.md Normal file
View File

@ -0,0 +1,18 @@
# Deploy transmission in docker
## Deploy
```bash
docker run \
--name transmission \
-d \
--restart always \
--publish 9091:9091 \
--publish 51413:51413 \
--publish 51413:51413/udp \
--mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \
--mount type=bind,src=/Downloads,dst=/root/Dowloads/ \
--mount type=bind,src=/data/trasmission/config/,dst=/var/lib/transmission/config/ \
newnius/transmission
```

8
transmission/bootstrap.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if ! [ "$(ls -A /var/lib/transmission/config/)" ]; then
cp /config/* /var/lib/transmission/config/
fi
/usr/bin/transmission-daemon --foreground --no-portmap --log-error --config-dir /var/lib/transmission/config

View File

@ -0,0 +1,68 @@
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/root/Downloads",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/root/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": true,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-host-whitelist": "",
"rpc-host-whitelist-enabled": true,
"rpc-password": "{4484c163b9d15b292dc94a37360196342ad8e3d2xDrU5n/C",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}