Remove rtorrent + do not expose ports which do not need to be
This commit is contained in:
parent
65ab5f42fe
commit
a1820b2428
|
@ -1,38 +0,0 @@
|
|||
FROM buildpack-deps:xenial-scm
|
||||
MAINTAINER Jean Froment <froment.je@gmail.com>
|
||||
|
||||
# For rtorrent
|
||||
ENV TERM=xterm
|
||||
|
||||
# Install dependencies
|
||||
RUN curl -sL "https://github.com/just-containers/s6-overlay/releases/download/v1.18.1.5/s6-overlay-amd64.tar.gz" \
|
||||
| tar xz -C / \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
screen \
|
||||
rtorrent \
|
||||
mediainfo \
|
||||
php7.0-fpm \
|
||||
php7.0-cli \
|
||||
nginx \
|
||||
unrar-free \
|
||||
unzip \
|
||||
ffmpeg \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Configure/install r(u)torrent
|
||||
RUN ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc \
|
||||
&& mkdir -p /var/run/php \
|
||||
&& git clone --depth=1 \
|
||||
https://github.com/Novik/ruTorrent.git \
|
||||
/opt/rutorrent \
|
||||
&& sed -i "s/www-data/root/g" /etc/php/7.0/fpm/pool.d/www.conf
|
||||
|
||||
VOLUME /config /torrents
|
||||
|
||||
EXPOSE 80 49161 49161/udp 6881/udp
|
||||
|
||||
COPY container-root/ /
|
||||
|
||||
CMD ["/init"]
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
# Make rtorrent session directory
|
||||
mkdir -p /config/rtorrent
|
||||
|
||||
# Add default config if it does not exist
|
||||
cp -n /etc/defaults/rtorrent.rc /config/rtorrent/rtorrent.rc
|
||||
|
||||
# Make folders for storing rutorrent data
|
||||
mkdir -p /config/rutorrent/settings /config/rutorrent/torrents \
|
||||
/config/rutorrent/users /config/rutorrent/plugins
|
|
@ -1,43 +0,0 @@
|
|||
# vim: ft=dosini
|
||||
|
||||
scgi_local = /var/run/rtorrent.sock
|
||||
|
||||
directory = /torrents
|
||||
session = /config/rtorrent
|
||||
|
||||
# Maximum and minimum number of peers to connect to per torrent.
|
||||
min_peers = 30
|
||||
max_peers = 150
|
||||
|
||||
# Same as above but for seeding completed torrents (-1 = same as downloading)
|
||||
min_peers_seed = -1
|
||||
max_peers_seed = -1
|
||||
|
||||
# Maximum number of simultaneous uploads per torrent.
|
||||
max_uploads = 15
|
||||
|
||||
# Global upload and download rate in KiB. "0" for unlimited.
|
||||
download_rate = 0
|
||||
upload_rate = 0
|
||||
|
||||
# Close torrents when diskspace is low.
|
||||
schedule = low_diskspace,5,60,close_low_diskspace=100M
|
||||
|
||||
port_range = 49161-49161
|
||||
|
||||
port_random = yes
|
||||
|
||||
check_hash = yes
|
||||
|
||||
use_udp_trackers = yes
|
||||
|
||||
# Encryption options, set to none (default) or any combination of the following:
|
||||
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
|
||||
encryption = allow_incoming,try_outgoing,enable_retry
|
||||
|
||||
dht = auto
|
||||
|
||||
# UDP port to use for DHT.
|
||||
dht_port = 6881
|
||||
|
||||
peer_exchange = yes
|
|
@ -1,52 +0,0 @@
|
|||
# vim: ft=nginx
|
||||
|
||||
user root root;
|
||||
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 4096;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log off;
|
||||
error_log off;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
server_name rtorrent;
|
||||
root /opt/rutorrent;
|
||||
|
||||
location /RPC2 {
|
||||
include scgi_params;
|
||||
scgi_pass unix:/var/run/rtorrent.sock;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
exec nginx -g "daemon off;"
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
exec php-fpm7.0 -F -R
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
# Make sure lock file is removed after end
|
||||
rm -f /config/rtorrent/rtorrent.lock
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
# Remove rtorrent lock file if it exists so rtorrent can start
|
||||
rm -f /config/rtorrent/rtorrent.lock
|
||||
|
||||
exec screen -D -m -S rtorrent rtorrent
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
|
||||
@define('HTTP_TIME_OUT', 30, true); // in seconds
|
||||
@define('HTTP_USE_GZIP', true, true);
|
||||
$httpIP = null; // IP string. Or null for any.
|
||||
|
||||
@define('RPC_TIME_OUT', 5, true); // in seconds
|
||||
|
||||
@define('LOG_RPC_CALLS', false, true);
|
||||
@define('LOG_RPC_FAULTS', true, true);
|
||||
|
||||
@define('PHP_USE_GZIP', false, true);
|
||||
@define('PHP_GZIP_LEVEL', 2, true);
|
||||
|
||||
$schedule_rand = 10; // rand for schedulers start, +0..X seconds
|
||||
|
||||
$do_diagnostic = true;
|
||||
$log_file = '/tmp/errors.log'; // path to log file (comment or leave blank to disable logging)
|
||||
|
||||
$saveUploadedTorrents = false; // Save uploaded torrents to profile/torrents directory or not
|
||||
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
|
||||
|
||||
$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
|
||||
$forbidUserSettings = false;
|
||||
|
||||
$scgi_host = "unix:///var/run/rtorrent.sock";
|
||||
$scgi_port = 0;
|
||||
|
||||
$XMLRPCMountPoint = "/RPC2";
|
||||
|
||||
$pathToExternals = array(
|
||||
"php" => '',
|
||||
"curl" => '/usr/bin/curl',
|
||||
"gzip" => '',
|
||||
"id" => '',
|
||||
"stat" => '',
|
||||
);
|
||||
|
||||
$localhosts = array( // list of local interfaces
|
||||
"127.0.0.1",
|
||||
"localhost",
|
||||
);
|
||||
|
||||
$profilePath = '/config/rutorrent'; // Path to user profiles
|
||||
$profileMask = 0770; // Mask for files and directory creation in user profiles.
|
||||
// Both Webserver and rtorrent users must have read-write access to it.
|
||||
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
|
||||
|
||||
$tempDirectory = null; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.
|
||||
|
||||
$canUseXSendFile = true; // Use X-Sendfile feature if it exist
|
||||
|
||||
$locale = "UTF8";
|
|
@ -24,31 +24,12 @@ services:
|
|||
env_file:
|
||||
- config
|
||||
|
||||
rtorrent:
|
||||
image: fromenje/seedbox:rtorrent
|
||||
build: Dockerfiles/rtorrent
|
||||
restart: always
|
||||
networks:
|
||||
- main
|
||||
ports:
|
||||
- "49161:49161"
|
||||
- "49161:49161/udp"
|
||||
- "6881:6881/udp"
|
||||
volumes:
|
||||
- config:/config
|
||||
- torrents:/torrents
|
||||
|
||||
deluge:
|
||||
image: fromenje/seedbox:deluge
|
||||
build: Dockerfiles/deluge
|
||||
restart: always
|
||||
networks:
|
||||
- main
|
||||
ports:
|
||||
- "8112:8112"
|
||||
- "58846:58846"
|
||||
- "53160:53160"
|
||||
- "53160:53160/udp"
|
||||
volumes:
|
||||
- torrents:/torrents
|
||||
- config:/config
|
||||
|
@ -61,8 +42,6 @@ services:
|
|||
restart: always
|
||||
networks:
|
||||
- main
|
||||
ports:
|
||||
- "12333:12333"
|
||||
volumes:
|
||||
- torrents:/torrents
|
||||
- config:/config
|
||||
|
|
Loading…
Reference in New Issue