diff --git a/.env.sample b/.env.sample index ebd6581..7978b18 100644 --- a/.env.sample +++ b/.env.sample @@ -26,3 +26,7 @@ NEXTCLOUD_ADMIN_PASSWORD=h4ckMePleAse873214668 # Portainer PORTAINER_ADMIN_PASSWORD=h4ckMePleAse + +# Flood username declared in deluge rpc daemon +FLOOD_PASSWORD=myfloodpassword +FLOOD_AUTOCREATE_USER_IN_DELUGE_DAEMON=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index f9f10bb..a8655bd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ **/.env **/traefik/http_auth backup/ +services.conf diff --git a/README.md b/README.md index a49a64c..6f4d6a7 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,15 @@ seedbox and personal media server. -----------------------|----------------------------|------------------------------------------------------------------------|-------------------------|---------------------| | Plex | plex.yourdomain.com | [linuxserver/plex](https://hub.docker.com/r/linuxserver/plex) | *latest* | Media Streaming | | Deluge | deluge.yourdomain.com | [linuxserver/deluge](https://hub.docker.com/r/linuxserver/deluge) | *latest* | Torrents downloader | +| Flood | flood.yourdomain.com | [jesec/flood](https://hub.docker.com/r/jesec/flood) | *latest* | Web client for Deluge (experimental) | | Sonarr | sonarr.yourdomain.com | [linuxserver/sonarr](https://hub.docker.com/r/linuxserver/sonarr) | *develop* | TV Shows monitor | | Radarr | radarr.yourdomain.com | [linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr) | *develop* | Movies monitor | | Bazarr | bazarr.yourdomain.com | [linuxserver/bazarr](https://hub.docker.com/r/linuxserver/bazarr) | *latest* | Subtitles monitor | | Lidarr | lidarr.yourdomain.com | [linuxserver/lidarr](https://hub.docker.com/r/linuxserver/lidarr) | *develop* | Music monitor | +| Ombi | ombi.yourdomain.com | [linuxserver/ombi](https://hub.docker.com/r/linuxserver/ombi) | *latest* | Plex content requests | +| Overseerr | overseerr.yourdomain.com | [linuxserver/overseerr](https://hub.docker.com/r/linuxserver/overseerr) | *latest* | Plex content requests | | Jackett | jackett.yourdomain.com | [linuxserver/jackett](https://hub.docker.com/r/linuxserver/jackett) | *latest* | Tracker indexer | +| Prowlarr | prowlarr.yourdomain.com | [linuxserver/prowlarr](https://hub.docker.com/r/linuxserver/prowlarr) | *nightly* | Tracker indexer **(new)** | | JDownloader | jdownloader.yourdomain.com | [jlesage/jdownloader-2](https://hub.docker.com/r/jlesage/jdownloader-2)| *latest* | Direct downloader | | Tautulli (plexPy) | tautulli.yourdomain.com | [linuxserver/tautulli](https://hub.docker.com/r/linuxserver/tautulli) | *latest* | Plex stats and admin| | Tdarr | tdarr.yourdomain.com | [haveagitgat/tdarr](https://hub.docker.com/r/haveagitgat/tdarr) | *latest* | Re-encode files | diff --git a/services.conf b/services.conf.sample similarity index 74% rename from services.conf rename to services.conf.sample index 6189d0e..3d4078d 100644 --- a/services.conf +++ b/services.conf.sample @@ -1,11 +1,15 @@ deluge: enable +flood: enable plex: enable flaresolverr: enable jackett: enable +prowlarr: enable sonarr: enable radarr: enable bazarr: enable lidarr: enable +ombi: disable +overseerr: enable tautulli: enable jdownloader: enable tdarr: enable diff --git a/services/flood.yaml b/services/flood.yaml new file mode 100644 index 0000000..8a89089 --- /dev/null +++ b/services/flood.yaml @@ -0,0 +1,32 @@ +services: + flood: + image: jesec/flood:latest + container_name: flood + restart: always + depends_on: + - deluge + user: ${PUID}:${PGID} + command: + - --auth=none + - --dehost=deluge + - --deport=58846 + - --deuser=flood + - --depass=${FLOOD_PASSWORD} + - --rundir=/config + volumes: + - configflood:/config + - torrents:/torrents + - downloads:/downloads + - /etc/localtime:/etc/localtime:ro + labels: + - "traefik.enable=true" + - "traefik.http.routers.flood.rule=Host(`flood.${TRAEFIK_DOMAIN}`)" + - "traefik.http.routers.flood.middlewares=common-auth@file" + - "traefik.http.routers.flood.service=flood-service" + - "traefik.http.services.flood-service.loadbalancer.server.port=3000" + +volumes: + configflood: + driver: local-persist + driver_opts: + mountpoint: /data/config/flood \ No newline at end of file diff --git a/services/netdata.yaml b/services/netdata.yaml index 5d5a0c9..bc118c6 100644 --- a/services/netdata.yaml +++ b/services/netdata.yaml @@ -1,6 +1,6 @@ services: netdata: - image: netdata/netdata + image: netdata/netdata:stable restart: always container_name: netdata hostname: netdata.${TRAEFIK_DOMAIN} @@ -16,7 +16,7 @@ services: - /etc/passwd:/host/etc/passwd:ro - /etc/group:/host/etc/group:ro - /etc/os-release:/host/etc/os-release:ro - - /var/run/docker.sock:/var/run/docker.sock:rw + - /var/run/docker.sock:/var/run/docker.sock:ro labels: - "traefik.enable=true" - "traefik.http.routers.netdata.rule=Host(`netdata.${TRAEFIK_DOMAIN}`)" diff --git a/services/ombi.yaml b/services/ombi.yaml new file mode 100644 index 0000000..ab41549 --- /dev/null +++ b/services/ombi.yaml @@ -0,0 +1,22 @@ +services: + ombi: + image: ghcr.io/linuxserver/ombi + container_name: ombi + restart: always + volumes: + - configombi:/config + environment: + - PGID=${PGID} + - PUID=${PUID} + - TZ=${TZ} + - BASE_URL=/ + labels: + - "traefik.enable=true" + - "traefik.http.routers.ombi.rule=Host(`ombi.${TRAEFIK_DOMAIN}`)" + #- "traefik.http.routers.ombi.middlewares=common-auth@file" + +volumes: + configombi: + driver: local-persist + driver_opts: + mountpoint: /data/config/ombi \ No newline at end of file diff --git a/services/overseerr.yaml b/services/overseerr.yaml new file mode 100644 index 0000000..0c9a0bb --- /dev/null +++ b/services/overseerr.yaml @@ -0,0 +1,20 @@ +services: + overseerr: + image: ghcr.io/linuxserver/overseerr + container_name: overseerr + restart: always + volumes: + - configoverseerr:/config + environment: + - PGID=${PGID} + - PUID=${PUID} + - TZ=${TZ} + labels: + - "traefik.enable=true" + - "traefik.http.routers.overseerr.rule=Host(`overseerr.${TRAEFIK_DOMAIN}`)" + +volumes: + configoverseerr: + driver: local-persist + driver_opts: + mountpoint: /data/config/overseerr \ No newline at end of file diff --git a/services/prowlarr.yaml b/services/prowlarr.yaml new file mode 100644 index 0000000..11bfc73 --- /dev/null +++ b/services/prowlarr.yaml @@ -0,0 +1,21 @@ +services: + prowlarr: + image: ghcr.io/linuxserver/prowlarr:nightly + container_name: prowlarr + restart: always + volumes: + - configprowlarr:/config + environment: + - PGID=${PGID} + - PUID=${PUID} + - TZ=${TZ} + labels: + - "traefik.enable=true" + - "traefik.http.routers.prowlarr.rule=Host(`prowlarr.${TRAEFIK_DOMAIN}`)" + - "traefik.http.routers.prowlarr.middlewares=common-auth@file" + +volumes: + configprowlarr: + driver: local-persist + driver_opts: + mountpoint: /data/config/prowlarr \ No newline at end of file diff --git a/update-all.sh b/update-all.sh index 8e4b476..ecb5659 100755 --- a/update-all.sh +++ b/update-all.sh @@ -1,5 +1,19 @@ #!/bin/bash +SKIP_PULL=0 + +for i in "$@"; do + case $i in + --no-pull) + SKIP_PULL=1 + ;; + *) + echo "[$0] ❌ ERROR: unknown parameter \"$i\"" + exit 1 + ;; + esac +done + # Create/update http_auth file according to values in .env file source .env echo "${HTTP_USER}:${HTTP_PASSWORD}" > traefik/http_auth @@ -7,17 +21,44 @@ echo "${HTTP_USER}:${HTTP_PASSWORD}" > traefik/http_auth # Docker-compose settings COMPOSE_HTTP_TIMEOUT=240 +if [[ ! -f services.conf ]]; then + echo "[$0] No services.conf file found. Copying from sample file..." + cp services.conf.sample services.conf +fi + +# Alert in case new services have been added (or removed) in sample but active file has not changed +NB_SERVICES_ACTIVE=$(cat services.conf | wc -l) +NB_SERVICES_ORIG=$(cat services.conf.sample | wc -l) +if [[ ${NB_SERVICES_ACTIVE} != ${NB_SERVICES_ORIG} ]]; then + echo "[$0] Your services.conf file seems outdated. It appears there are new services available, or services that have been removed." + diff -yt services.conf services.conf.sample +fi + # Fetch all YAML files disabled_pattern="" while read -r line ; do - disabled_pattern="${disabled_pattern} ! -name $line.yaml" + disabled_pattern="${disabled_pattern} ! -name $line.yaml" done < <(grep "disable" services.conf | awk -F : '{print $1}' ) SERVICES=$(find services -mindepth 1 -maxdepth 1 -name "*.yaml" ${disabled_pattern} | sed -e 's/^/-f /') ALL_SERVICES="-f docker-compose.yaml $SERVICES" -echo "[$0] ***** Pulling all images... *****" -docker-compose ${ALL_SERVICES} pull +# Specific instructions for Flood +# User for Deluge daemon RPC has to be created in deluge auth config file +if [[ ! -z ${FLOOD_PASSWORD} && ${FLOOD_AUTOCREATE_USER_IN_DELUGE_DAEMON} == true ]]; then + if ! grep -q "flood" /data/config/deluge/auth; then + echo "flood:${FLOOD_PASSWORD}:10" >> /data/config/deluge/auth + else + echo "[$0] No need to add user/password for flood as it has already been created." + echo "[$0] Consider setting FLOOD_AUTOCREATE_USER_IN_DELUGE_DAEMON variable to false in .env file." + fi +fi + +if [[ "${SKIP_PULL}" != "1" ]]; then + echo "[$0] ***** Pulling all images... *****" + docker-compose ${ALL_SERVICES} pull +fi + echo "[$0] ***** Recreating containers if required... *****" docker-compose ${ALL_SERVICES} up -d --remove-orphans echo "[$0] ***** Done updating containers *****"