diff --git a/Dockerfiles/frontend/nginx.conf b/Dockerfiles/frontend/nginx.conf index 5316df4..b9c5a94 100644 --- a/Dockerfiles/frontend/nginx.conf +++ b/Dockerfiles/frontend/nginx.conf @@ -34,28 +34,16 @@ http { auth_basic "Restricted"; auth_basic_user_file .htpasswd; - upstream rtorrent { - server rtorrent; - } - - upstream syncthing { - server syncthing:8384; - } - - upstream plex { - server plex:32400; - } - - upstream sickrage { - server sickrage:8081; - } + # Use builtin Docker DNS as resolver for services + resolver 127.0.0.11; server { include common.conf; server_name ~^(rtorrent)(\.\w+)+$; location / { - proxy_pass http://rtorrent; + set $rtorrent http://rtorrent:80; + proxy_pass $rtorrent; } } @@ -64,7 +52,8 @@ http { server_name ~^(sickrage)(\.\w+)+$; location / { - proxy_pass http://sickrage; + set $sickrage http://sickrage:8081; + proxy_pass $sickrage; } } @@ -73,7 +62,8 @@ http { server_name ~^(syncthing)(\.\w+)+$; location / { - proxy_pass http://syncthing; + set $syncthing http://syncthing:8384; + proxy_pass $syncthing; } } @@ -82,7 +72,18 @@ http { server_name ~^(plex)(\.\w+)+$; location / { - proxy_pass http://plex; + set $plex http://plex:32400; + proxy_pass $plex; + } + } + + server { + include common.conf; + server_name ~^(sonarr)(\.\w+)+$; + + location / { + set $sonarr http://sonarr:8989; + proxy_pass $sonarr; } } } diff --git a/Dockerfiles/sonarr/Dockerfile b/Dockerfiles/sonarr/Dockerfile new file mode 100644 index 0000000..9c1daae --- /dev/null +++ b/Dockerfiles/sonarr/Dockerfile @@ -0,0 +1,18 @@ +FROM buildpack-deps:xenial-scm +MAINTAINER Kelvin Chen + +# Install Sonarr +RUN echo "deb http://apt.sonarr.tv/ master main" \ + > /etc/apt/sources.list.d/sonarr.list \ + && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC \ + && apt-get update \ + && apt-get install -y nzbdrone \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +VOLUME /config + +EXPOSE 8989 + +COPY init / + +CMD ["/init"] diff --git a/Dockerfiles/sonarr/init b/Dockerfiles/sonarr/init new file mode 100755 index 0000000..e94b4b3 --- /dev/null +++ b/Dockerfiles/sonarr/init @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +mkdir -p /config/sonarr + +mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config/sonarr diff --git a/README.md b/README.md index 465a69d..8633a03 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Seedbox -A collection of Dockerfiles and docker-compose configuration to set up a -seedbox. +A collection of Dockerfiles and a docker-compose configuration to set up a +seedbox and personal media server. -## Accessing the available WebUIs -Go to `X.domain` where `X` is the item you want to access. -Included items are: +## Accessing a Service's Web Interface +Go to `x.hostname` where `x` is the service you want to access. +Included services are: - rtorrent - sickrage +- sonarr - syncthing - plex diff --git a/docker-compose.yml b/docker-compose.yml index 0a9b1b9..358919f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,16 @@ services: - config:/config - torrents:/torrents + sonarr: + image: kelvinchen/seedbox:sonarr + build: Dockerfiles/sonarr + restart: always + networks: + - main + volumes: + - config:/config + - torrents:/torrents + syncthing: image: kelvinchen/seedbox:syncthing build: Dockerfiles/syncthing