From 2ce1c4fafcc55d63564a35035b1ea35c38ffdc6d Mon Sep 17 00:00:00 2001 From: Kelvin Chen Date: Thu, 6 Oct 2016 23:11:58 -0400 Subject: [PATCH] Update rtorrent image - Switch to Ubuntu Xenial as base - Update PHP5->PHP7 - Remove AutoDL-irssi since it causes more problems than it is worth --- Dockerfiles/rtorrent/Dockerfile | 45 ++++++++++----------------- Dockerfiles/rtorrent/autodl.cfg | 3 -- Dockerfiles/rtorrent/{start => init} | 9 +----- Dockerfiles/rtorrent/irssi.cfg | 4 --- Dockerfiles/rtorrent/nginx.conf | 9 ++---- Dockerfiles/rtorrent/supervisord.conf | 8 +---- 6 files changed, 21 insertions(+), 57 deletions(-) delete mode 100644 Dockerfiles/rtorrent/autodl.cfg rename Dockerfiles/rtorrent/{start => init} (62%) delete mode 100644 Dockerfiles/rtorrent/irssi.cfg diff --git a/Dockerfiles/rtorrent/Dockerfile b/Dockerfiles/rtorrent/Dockerfile index dba0453..06df0da 100644 --- a/Dockerfiles/rtorrent/Dockerfile +++ b/Dockerfiles/rtorrent/Dockerfile @@ -1,48 +1,35 @@ -FROM kelvinchen/seedbox:base +FROM buildpack-deps:xenial-scm MAINTAINER Kelvin Chen -# Install all dependencies -RUN echo "deb http://httpredir.debian.org/debian stretch main" >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ +# Install dependencies +RUN apt-get update \ + && apt-get install -y \ + supervisor \ rtorrent \ - php5-fpm \ - php5-cli \ - php5-geoip \ mediainfo \ - irssi \ - libxml-libxml-perl \ - libxml-libxslt-perl \ - libjson-perl \ - libjson-xs-perl \ - libnet-ssleay-perl \ - libdigest-perl \ - libdigest-sha-perl \ - libhtml-parser-perl \ - libarchive-zip-perl \ + 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 and autodl-irssi +# 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 \ - && git clone --depth=1 --recursive \ - https://github.com/autodl-community/autodl-irssi.git \ - ~/.irssi/scripts \ - && mkdir -p ~/.irssi/scripts/autorun \ - && cp ~/.irssi/scripts/autodl-irssi.pl ~/.irssi/scripts/autorun \ - && ln -s /config/autodl/ ~/.autodl \ - && sed -i "s/www-data/root/g" /etc/php5/fpm/pool.d/www.conf + && 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 start rtorrent.rc supervisord.conf autodl.cfg / +COPY init rtorrent.rc supervisord.conf / COPY nginx.conf /etc/nginx/nginx.conf COPY rutorrent_config.php /opt/rutorrent/conf/config.php -COPY irssi.cfg /root/.irssi/config -CMD ["/start"] +CMD ["/init"] diff --git a/Dockerfiles/rtorrent/autodl.cfg b/Dockerfiles/rtorrent/autodl.cfg deleted file mode 100644 index 00e41a7..0000000 --- a/Dockerfiles/rtorrent/autodl.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[options] -gui-server-port = 39410 -gui-server-password = password diff --git a/Dockerfiles/rtorrent/start b/Dockerfiles/rtorrent/init similarity index 62% rename from Dockerfiles/rtorrent/start rename to Dockerfiles/rtorrent/init index 8828e73..6f29535 100755 --- a/Dockerfiles/rtorrent/start +++ b/Dockerfiles/rtorrent/init @@ -7,17 +7,10 @@ mkdir -p /config/rtorrent cp -n /rtorrent.rc /config/rtorrent/rtorrent.rc # Remove rtorrent lock file if it exists so rtorrent can start -rm /config/rtorrent/rtorrent.lock +rm -f /config/rtorrent/rtorrent.lock # Make folders for storing rutorrent data mkdir -p /config/rutorrent/settings /config/rutorrent/torrents \ /config/rutorrent/users /config/rutorrent/plugins -# Copy all plugins in /config/rutorrent/plugins to the rutorrent directory -cp -rf $(ls -d1 /config/rutorrent/plugins/**) /opt/rutorrent/plugins/ - -# Set up autodl-irssi -mkdir -p /config/autodl -cp -n /autodl.cfg /config/autodl - supervisord -c /supervisord.conf diff --git a/Dockerfiles/rtorrent/irssi.cfg b/Dockerfiles/rtorrent/irssi.cfg deleted file mode 100644 index 46bb45d..0000000 --- a/Dockerfiles/rtorrent/irssi.cfg +++ /dev/null @@ -1,4 +0,0 @@ -settings = { - core = { real_name = "irssi"; user_name = "irssi"; nick = "irssi"; }; - "fe-text" = { actlist_sort = "refnum"; }; -}; diff --git a/Dockerfiles/rtorrent/nginx.conf b/Dockerfiles/rtorrent/nginx.conf index 4544d51..2f729a7 100644 --- a/Dockerfiles/rtorrent/nginx.conf +++ b/Dockerfiles/rtorrent/nginx.conf @@ -24,10 +24,7 @@ http { access_log off; error_log off; - gzip on; - gzip_disable "msie6"; - - client_max_body_size 8M; + client_max_body_size 0; server { listen 80 default_server; @@ -42,11 +39,11 @@ http { } location / { - try_files $uri $uri/ =404; + try_files $uri $uri/ =404; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } diff --git a/Dockerfiles/rtorrent/supervisord.conf b/Dockerfiles/rtorrent/supervisord.conf index 1721f2c..2539fc8 100644 --- a/Dockerfiles/rtorrent/supervisord.conf +++ b/Dockerfiles/rtorrent/supervisord.conf @@ -11,16 +11,10 @@ autorestart = true [program:php] priority = 2 -command = php5-fpm -F -R +command = php-fpm7.0 -F -R autorestart = true [program:nginx] priority = 3 command = nginx -g "daemon off;" autorestart = true - -[program:autodl-irssi] -priority = 4 -environment = TERM=xterm -command = irssi -autorestart = true