diff --git a/Dockerfiles/frontend/Dockerfile b/Dockerfiles/frontend/Dockerfile index c2f8a16..2e1c876 100644 --- a/Dockerfiles/frontend/Dockerfile +++ b/Dockerfiles/frontend/Dockerfile @@ -1,5 +1,5 @@ FROM nginx:1.11-alpine -MAINTAINER Kelvin Chen +MAINTAINER Jean Froment RUN apk add --no-cache apache2-utils openssl @@ -9,7 +9,7 @@ EXPOSE 80 443 ENV USERNAME=user \ PASSWORD=hunter2 \ - USE_SSL=false + USE_SSL=true COPY nginx.conf common_default.conf ssl.conf /etc/nginx/ COPY init / diff --git a/Dockerfiles/frontend/nginx.conf b/Dockerfiles/frontend/nginx.conf index 6b7b89c..2f12f6d 100644 --- a/Dockerfiles/frontend/nginx.conf +++ b/Dockerfiles/frontend/nginx.conf @@ -47,26 +47,6 @@ http { } } - server { - include common.conf; - server_name ~^(sickrage)(\.\w+)+$; - - location / { - set $sickrage http://sickrage:8081; - proxy_pass $sickrage; - } - } - - server { - include common.conf; - server_name ~^(syncthing)(\.\w+)+$; - - location / { - set $syncthing http://syncthing:8384; - proxy_pass $syncthing; - } - } - server { include common.conf; server_name ~^(plex)(\.\w+)+$; diff --git a/Dockerfiles/openvpn/Dockerfile b/Dockerfiles/openvpn/Dockerfile deleted file mode 100644 index 231efc0..0000000 --- a/Dockerfiles/openvpn/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM buildpack-deps:xenial-curl -MAINTAINER Kelvin Chen - -# Install OpenVPN -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 --no-install-recommends \ - openvpn \ - easy-rsa \ - iptables \ - bridge-utils \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -WORKDIR /usr/share/easy-rsa - -EXPOSE 1194/udp - -VOLUME /config - -COPY container-root/ / - -CMD ["/init"] diff --git a/Dockerfiles/openvpn/container-root/etc/cont-init.d/10-mknod b/Dockerfiles/openvpn/container-root/etc/cont-init.d/10-mknod deleted file mode 100644 index f6b755f..0000000 --- a/Dockerfiles/openvpn/container-root/etc/cont-init.d/10-mknod +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/with-contenv bash - -mkdir -p /dev/net - -if [ ! -c /dev/net/tun ]; then - mknod /dev/net/tun c 10 200 -fi - -chmod 600 /dev/net/tun diff --git a/Dockerfiles/openvpn/container-root/etc/cont-init.d/20-iptables b/Dockerfiles/openvpn/container-root/etc/cont-init.d/20-iptables deleted file mode 100644 index 22c75f2..0000000 --- a/Dockerfiles/openvpn/container-root/etc/cont-init.d/20-iptables +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE diff --git a/Dockerfiles/openvpn/container-root/etc/cont-init.d/30-ovpn b/Dockerfiles/openvpn/container-root/etc/cont-init.d/30-ovpn deleted file mode 100644 index f9fc3c6..0000000 --- a/Dockerfiles/openvpn/container-root/etc/cont-init.d/30-ovpn +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/with-contenv bash - -# Make sure OpenVPN config directory exists. -mkdir -p /config/openvpn/ - -# Copy over the default OpenVPN config if it does not exist -cp -n /etc/defaults/openvpn.conf /config/openvpn/ - -# Create server CA/keys and keys for client "client" if they do not exist -if [ ! -d "/config/openvpn/keys" ]; then - cd /usr/share/easy-rsa - source vars - ./clean-all - ./build-dh - ./pkitool --initca - ./pkitool --server server - ./pkitool client - openvpn --genkey --secret /config/openvpn/keys/ta.key -fi diff --git a/Dockerfiles/openvpn/container-root/etc/defaults/client.ovpn b/Dockerfiles/openvpn/container-root/etc/defaults/client.ovpn deleted file mode 100644 index d274612..0000000 --- a/Dockerfiles/openvpn/container-root/etc/defaults/client.ovpn +++ /dev/null @@ -1,22 +0,0 @@ -client - -nobind - -remote MYSERVER_HOST 1194 -proto udp -dev tun - -resolv-retry infinite - -cipher AES-256-CBC -auth SHA512 - -tls-client - -# comp-lzo - -persist-tun -persist-key - -sndbuf 393216 -rcvbuf 393216 diff --git a/Dockerfiles/openvpn/container-root/etc/defaults/openvpn.conf b/Dockerfiles/openvpn/container-root/etc/defaults/openvpn.conf deleted file mode 100644 index ad15a8f..0000000 --- a/Dockerfiles/openvpn/container-root/etc/defaults/openvpn.conf +++ /dev/null @@ -1,36 +0,0 @@ -# vim: ft=conf - -port 1194 -proto udp -dev tun - -ca /config/openvpn/keys/ca.crt -cert /config/openvpn/keys/server.crt -key /config/openvpn/keys/server.key -dh /config/openvpn/keys/dh2048.pem -tls-auth /config/openvpn/keys/ta.key 0 - -cipher AES-256-CBC -auth SHA512 - -tls-server - -server 10.8.0.0 255.255.255.0 - -ifconfig-pool-persist /config/openvpn/ipp.txt - -keepalive 10 120 - -push "redirect-gateway def1 bypass-dhcp" -push "dhcp-option DNS 8.8.8.8" -push "dhcp-option DNS 8.8.4.4" - -# comp-lzo - -persist-key -persist-tun - -sndbuf 393216 -rcvbuf 393216 -push "sndbuf 393216" -push "rcvbuf 393216" diff --git a/Dockerfiles/openvpn/container-root/etc/services.d/openvpn/run b/Dockerfiles/openvpn/container-root/etc/services.d/openvpn/run deleted file mode 100644 index 496fe27..0000000 --- a/Dockerfiles/openvpn/container-root/etc/services.d/openvpn/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv sh - -exec openvpn /config/openvpn/openvpn.conf diff --git a/Dockerfiles/openvpn/container-root/usr/local/bin/export-client b/Dockerfiles/openvpn/container-root/usr/local/bin/export-client deleted file mode 100755 index 2da63cb..0000000 --- a/Dockerfiles/openvpn/container-root/usr/local/bin/export-client +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -KEYDIR="/config/openvpn/keys" -CLIENT=${1:-client} - -echo " -$(cat /etc/defaults/client.ovpn) - -$(cat $KEYDIR/ca.crt) - - -$(cat $KEYDIR/$CLIENT.crt) - - -$(cat $KEYDIR/$CLIENT.key) - - -$(cat $KEYDIR/ta.key) - -key-direction 1 -" diff --git a/Dockerfiles/openvpn/container-root/usr/share/easy-rsa/vars b/Dockerfiles/openvpn/container-root/usr/share/easy-rsa/vars deleted file mode 100644 index 845be48..0000000 --- a/Dockerfiles/openvpn/container-root/usr/share/easy-rsa/vars +++ /dev/null @@ -1,61 +0,0 @@ -# easy-rsa parameter settings - -export EASY_RSA="/usr/share/easy-rsa" - -export OPENSSL="openssl" -export PKCS11TOOL="pkcs11-tool" -export GREP="grep" - -# This variable should point to -# the openssl.cnf file included -# with easy-rsa. -export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA` - -# Edit this variable to point to -# your soon-to-be-created key -# directory. -# -# WARNING: clean-all will do -# a rm -rf on this directory -# so make sure you define -# it correctly! -export KEY_DIR="/config/openvpn/keys" - -# PKCS11 fixes -export PKCS11_MODULE_PATH="dummy" -export PKCS11_PIN="dummy" - -# Increase this to 2048 if you -# are paranoid. This will slow -# down TLS negotiation performance -# as well as the one-time DH parms -# generation process. -export KEY_SIZE=2048 - -# In how many days should the root CA key expire? -export CA_EXPIRE=3650 - -# In how many days should certificates expire? -export KEY_EXPIRE=3650 - -# These are the default values for fields -# which will be placed in the certificate. -# Don't leave any of these fields blank. -export KEY_COUNTRY="US" -export KEY_PROVINCE="CA" -export KEY_CITY="MyCity" -export KEY_ORG="MyOrg" -export KEY_EMAIL="me@myhost.mydomain" -export KEY_OU="MyOrganizationalUnit" - -# X509 Subject Field -export KEY_NAME="EasyRSA" - -# PKCS11 Smart Card -# export PKCS11_MODULE_PATH="/usr/lib/changeme.so" -# export PKCS11_PIN=1234 - -# If you'd like to sign all keys with the same Common Name, uncomment the -# KEY_CN export below. You will also need to make sure your OpenVPN server -# config has the duplicate-cn option set -# export KEY_CN="CommonName" diff --git a/Dockerfiles/plex/Dockerfile b/Dockerfiles/plex/Dockerfile index cb3dd87..53b4c95 100644 --- a/Dockerfiles/plex/Dockerfile +++ b/Dockerfiles/plex/Dockerfile @@ -1,5 +1,5 @@ FROM buildpack-deps:xenial-scm -MAINTAINER Kelvin Chen +MAINTAINER Jean Froment # Download plexupdate script and install Plex # This script can be later used to update Plex directly in the container diff --git a/Dockerfiles/rtorrent/Dockerfile b/Dockerfiles/rtorrent/Dockerfile index fbb456b..3aee22b 100644 --- a/Dockerfiles/rtorrent/Dockerfile +++ b/Dockerfiles/rtorrent/Dockerfile @@ -1,5 +1,5 @@ FROM buildpack-deps:xenial-scm -MAINTAINER Kelvin Chen +MAINTAINER Jean Froment # For rtorrent ENV TERM=xterm diff --git a/Dockerfiles/sickrage/Dockerfile b/Dockerfiles/sickrage/Dockerfile deleted file mode 100644 index 1344506..0000000 --- a/Dockerfiles/sickrage/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM buildpack-deps:xenial-scm -MAINTAINER Kelvin Chen - -RUN apt-get update \ - && apt-get install --no-install-recommends -y python-cheetah \ - && git clone --depth=1 \ - https://github.com/SickRage/SickRage.git \ - /opt/sickrage \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -VOLUME /config - -EXPOSE 8081 - -CMD python /opt/sickrage/SickBeard.py --nolaunch --datadir \ - /config/sickrage >> /dev/null 2>&1 diff --git a/Dockerfiles/sonarr/Dockerfile b/Dockerfiles/sonarr/Dockerfile index fd5707c..9e60de8 100644 --- a/Dockerfiles/sonarr/Dockerfile +++ b/Dockerfiles/sonarr/Dockerfile @@ -1,5 +1,5 @@ FROM buildpack-deps:xenial-scm -MAINTAINER Kelvin Chen +MAINTAINER Jean Froment # Install Sonarr, S6, and Jackett RUN echo "deb http://apt.sonarr.tv/ master main" \ diff --git a/Dockerfiles/syncthing/Dockerfile b/Dockerfiles/syncthing/Dockerfile deleted file mode 100644 index dde5fd4..0000000 --- a/Dockerfiles/syncthing/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM buildpack-deps:xenial-curl -MAINTAINER Kelvin Chen - -RUN apt-get update \ - && apt-get install -y apt-transport-https \ - && curl -sL https://syncthing.net/release-key.txt | apt-key add - \ - && echo "deb https://apt.syncthing.net/ syncthing release" >> \ - /etc/apt/sources.list.d/syncthing.list \ - && apt-get update \ - && apt-get install -y syncthing \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -VOLUME /config - -EXPOSE 8384 22000 21027/udp - -COPY init config.xml / - -CMD ["/init"] diff --git a/Dockerfiles/syncthing/config.xml b/Dockerfiles/syncthing/config.xml deleted file mode 100644 index 2b83bf8..0000000 --- a/Dockerfiles/syncthing/config.xml +++ /dev/null @@ -1,10 +0,0 @@ - - -
0.0.0.0:8384
-
- - 0.0.0.0:22000 - false - false - -
diff --git a/Dockerfiles/syncthing/init b/Dockerfiles/syncthing/init deleted file mode 100755 index d5ef01b..0000000 --- a/Dockerfiles/syncthing/init +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -mkdir -p /config/syncthing - -cp -n /config.xml /config/syncthing - -exec syncthing -home /config/syncthing -no-browser >> /dev/null 2>&1 diff --git a/README.md b/README.md index bad895a..008b21c 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,8 @@ seedbox and personal media server. Go to `x.hostname` where `x` is the service you want to access. Included services are: - rtorrent -- sickrage - sonarr - jackett (included in the sonarr image) -- syncthing - plex The front-end reverse proxy routes based on the lowest level subdomain (e.g. @@ -62,15 +60,3 @@ All data are saved in the docker volumes `seedbox_config` or You can also replace these docker volumes with static path if you want to handle manually where files are stored on your server. You can do this by editing the volumes settings in the `docker-compose.yml` file. - -## OpenVPN -The OpenVPN container generates a single client key/cert pair by default. -Run the command below to get your OpenVPN config file: -```sh -$ docker-compose exec openvpn export-client client >> client.ovpn -``` -Edit the `client.ovpn` and replace the line `remote MYSERVER_HOST 1194` with -the hostname or IP address of your server. - -You can also create more certs by by docker exec-ing into the container and -using easy-rsa. diff --git a/build-all.sh b/build-all.sh index 99bcc5b..ea3b262 100755 --- a/build-all.sh +++ b/build-all.sh @@ -22,11 +22,9 @@ while getopts ":nq" opt; do esac done -docker build -t kelvinchen/seedbox:frontend $ARGS Dockerfiles/frontend & -docker build -t kelvinchen/seedbox:plex $ARGS Dockerfiles/plex & -docker build -t kelvinchen/seedbox:rtorrent $ARGS Dockerfiles/rtorrent & -docker build -t kelvinchen/seedbox:sickrage $ARGS Dockerfiles/sickrage & -docker build -t kelvinchen/seedbox:syncthing $ARGS Dockerfiles/syncthing & -docker build -t kelvinchen/seedbox:openvpn $ARGS Dockerfiles/openvpn & +docker build -t fromenje/seedbox:frontend $ARGS Dockerfiles/frontend & +docker build -t fromenje/seedbox:plex $ARGS Dockerfiles/plex & +docker build -t fromenje/seedbox:rtorrent $ARGS Dockerfiles/rtorrent & +docker build -t fromenje/seedbox:sonarr $ARGS Dockerfiles/sonarr & wait diff --git a/config.default b/config.default index aad5d85..e52b7f2 100644 --- a/config.default +++ b/config.default @@ -1,6 +1,6 @@ USERNAME=username PASSWORD=hunter2 -USE_SSL=false +USE_SSL=true # For Plex Pass download PLEX_EMAIL= diff --git a/docker-compose.yml b/docker-compose.yml index a2b3a63..022edd2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ volumes: services: frontend: - image: kelvinchen/seedbox:frontend + image: fromenje/seedbox:frontend build: Dockerfiles/frontend restart: always networks: @@ -25,7 +25,7 @@ services: - config rtorrent: - image: kelvinchen/seedbox:rtorrent + image: fromenje/seedbox:rtorrent build: Dockerfiles/rtorrent restart: always networks: @@ -39,7 +39,7 @@ services: - torrents:/torrents plex: - image: kelvinchen/seedbox:plex + image: fromenje/seedbox:plex build: Dockerfiles/plex restart: always networks: @@ -52,18 +52,8 @@ services: env_file: - config - sickrage: - image: kelvinchen/seedbox:sickrage - build: Dockerfiles/sickrage - restart: always - networks: - - main - volumes: - - config:/config - - torrents:/torrents - sonarr: - image: kelvinchen/seedbox:sonarr + image: fromenje/seedbox:sonarr build: Dockerfiles/sonarr restart: always networks: @@ -71,30 +61,3 @@ services: volumes: - config:/config - torrents:/torrents - - syncthing: - image: kelvinchen/seedbox:syncthing - build: Dockerfiles/syncthing - restart: always - networks: - - main - ports: - - "22000:22000" - - "21027:21027/udp" - volumes: - - config:/config - - torrents:/torrents - - openvpn: - image: kelvinchen/seedbox:openvpn - build: Dockerfiles/openvpn - restart: always - networks: - - main - ports: - - "1194:1194/udp" - volumes: - - config:/config - - torrents:/torrents - cap_add: - - NET_ADMIN diff --git a/push-images.sh b/push-images.sh index bc8a796..caa37be 100755 --- a/push-images.sh +++ b/push-images.sh @@ -2,9 +2,7 @@ # Push all images to the docker registry. -docker push kelvinchen/seedbox:frontend -docker push kelvinchen/seedbox:plex -docker push kelvinchen/seedbox:rtorrent -docker push kelvinchen/seedbox:sickrage -docker push kelvinchen/seedbox:syncthing -docker push kelvinchen/seedbox:openvpn +docker push fromenje/seedbox:frontend +docker push fromenje/seedbox:plex +docker push fromenje/seedbox:rtorrent +docker push fromenje/seedbox:sonarr