diff --git a/Dockerfiles/couchpotato/Dockerfile b/Dockerfiles/couchpotato/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfiles/couchpotato/root/etc/cont-init.d/30-config b/Dockerfiles/couchpotato/root/etc/cont-init.d/30-config new file mode 100755 index 0000000..1cbb72b --- /dev/null +++ b/Dockerfiles/couchpotato/root/etc/cont-init.d/30-config @@ -0,0 +1,12 @@ +#!/usr/bin/with-contenv bash + +# create folders +mkdir -p \ + /var/log/couchpotato + +# permissions +chown -R abc:abc \ + /app + +chmod 777 \ + /var/log/couchpotato diff --git a/Dockerfiles/couchpotato/root/etc/services.d/couchpotato/run b/Dockerfiles/couchpotato/root/etc/services.d/couchpotato/run new file mode 100755 index 0000000..c0e2237 --- /dev/null +++ b/Dockerfiles/couchpotato/root/etc/services.d/couchpotato/run @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash + +UMASK_SET=${UMASK_SET:-022} +umask "$UMASK_SET" + +exec \ + s6-setuidgid abc python /app/couchpotato/CouchPotato.py \ + --config_file=/config/config.ini --data_dir=/config/data diff --git a/Dockerfiles/frontend/nginx.conf b/Dockerfiles/frontend/nginx.conf index 87bf3a1..5eef30c 100644 --- a/Dockerfiles/frontend/nginx.conf +++ b/Dockerfiles/frontend/nginx.conf @@ -87,6 +87,17 @@ http { proxy_pass $sonarr; } } + + server { + include common.conf; + server_name ~^(couchpotato)(\.\w+)+$; + + location / { + set $sonarr http://couchpotato:5050; + proxy_pass $sonarr; + } + } + } # vim: ft=nginx diff --git a/README.md b/README.md index 0beb082..cf897e5 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Included services are: - jackett (included in the sonarr image) - plex - h5ai (service accessible via `explore.hostname`) +- couchpotato The front-end reverse proxy routes based on the lowest level subdomain (e.g. `deluge.example.com` would route to deluge). Since this is how the router diff --git a/build-all.sh b/build-all.sh index c35bfe2..fd291c6 100755 --- a/build-all.sh +++ b/build-all.sh @@ -22,11 +22,11 @@ while getopts ":nq" opt; do esac done -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:deluge $ARGS Dockerfiles/deluge & -docker build -t fromenje/seedbox:sonarr $ARGS Dockerfiles/sonarr & -docker build -t fromenje/seedbox:h5ai $ARGS Dockerfiles/h5ai & +docker build -t fromenje/seedbox:frontend $ARGS Dockerfiles/frontend & +docker build -t fromenje/seedbox:plex $ARGS Dockerfiles/plex & +docker build -t fromenje/seedbox:deluge $ARGS Dockerfiles/deluge & +docker build -t fromenje/seedbox:sonarr $ARGS Dockerfiles/sonarr & +docker build -t fromenje/seedbox:h5ai $ARGS Dockerfiles/h5ai & +docker build -t fromenje/seedbox:couchpotato $ARGS Dockerfiles/couchpotato & wait diff --git a/docker-compose.yml b/docker-compose.yml index 6ecbf1b..740997e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,3 +75,16 @@ services: volumes: - config:/config - torrents:/torrents + + couchpotato: + image: fromenje/seedbox:couchpotato + build: Dockerfiles/couchpotato + restart: always + networks: + - main + volumes: + - config:/config + - torrents/deluge:/downloads + - torrents/Movies:/movies + env_file: + - config diff --git a/push-images.sh b/push-images.sh index 937eb8f..3ac2978 100755 --- a/push-images.sh +++ b/push-images.sh @@ -4,7 +4,7 @@ docker push fromenje/seedbox:frontend docker push fromenje/seedbox:plex -docker push fromenje/seedbox:rtorrent docker push fromenje/seedbox:sonarr docker push fromenje/seedbox:deluge docker push fromenje/seedbox:h5ai +docker push fromenje/seedbox:couchpotato