mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-11-03 18:25:46 +01:00
add settings.json, init file, start routine
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -15,14 +15,11 @@ apt-get install $APTLIST -qy && \
|
|||||||
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||||
|
|
||||||
#Adding Custom files
|
#Adding Custom files
|
||||||
#ADD init/ /etc/my_init.d/
|
ADD init/ /etc/my_init.d/
|
||||||
#ADD services/ /etc/service/
|
ADD services/ /etc/service/
|
||||||
#ADD cron/ /etc/cron.d/
|
#ADD cron/ /etc/cron.d/
|
||||||
#ADD defaults/ /defaults/
|
ADD defaults/ /defaults/
|
||||||
RUN chmod -v +x /etc/service/*/run && chmod -v +x /etc/my_init.d/*.sh && \
|
RUN chmod -v +x /etc/service/*/run && chmod -v +x /etc/my_init.d/*.sh
|
||||||
|
|
||||||
# give abc user home folder /config
|
|
||||||
usermod -d /config abc
|
|
||||||
|
|
||||||
# Volumes and Ports
|
# Volumes and Ports
|
||||||
VOLUME /config /downloads
|
VOLUME /config /downloads
|
||||||
|
|||||||
68
defaults/settings.json
Normal file
68
defaults/settings.json
Normal 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": "/downloads/complete",
|
||||||
|
"download-queue-enabled": true,
|
||||||
|
"download-queue-size": 5,
|
||||||
|
"encryption": 1,
|
||||||
|
"idle-seeding-limit": 30,
|
||||||
|
"idle-seeding-limit-enabled": false,
|
||||||
|
"incomplete-dir": "/downloads/incomplete",
|
||||||
|
"incomplete-dir-enabled": true,
|
||||||
|
"lpd-enabled": false,
|
||||||
|
"message-level": 2,
|
||||||
|
"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": true,
|
||||||
|
"preallocation": 1,
|
||||||
|
"prefetch-enabled": 1,
|
||||||
|
"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-password": "{1ddd3f1f6a71d655cde7767242a23a575b44c909n5YuRT.f",
|
||||||
|
"rpc-port": 9091,
|
||||||
|
"rpc-url": "/transmission/",
|
||||||
|
"rpc-username": "",
|
||||||
|
"rpc-whitelist": "127.0.0.1",
|
||||||
|
"rpc-whitelist-enabled": false,
|
||||||
|
"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": 2,
|
||||||
|
"upload-slots-per-torrent": 14,
|
||||||
|
"utp-enabled": true,
|
||||||
|
"watch-dir": "/config/watch",
|
||||||
|
"watch-dir-enabled": true
|
||||||
|
}
|
||||||
9
init/30_set_config.sh
Normal file
9
init/30_set_config.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir -p /downloads/incomplete /downloads/complete
|
||||||
|
|
||||||
|
[[ ! -f /config/settings.json ]] && cp /defaults/settings.json /config/settings.json
|
||||||
|
|
||||||
|
mkdir -p /config/watch
|
||||||
|
|
||||||
|
chown abc:abc /config/watch /config/settings.json /downloads /downloads/incomplete /downloads/complete
|
||||||
3
services/transmission/run
Normal file
3
services/transmission/run
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/sbin/setuser abc /usr/bin/transmission-daemon -g /config -c /config/watch -f
|
||||||
Reference in New Issue
Block a user