From 0d2952c006105ad24ad61a085a77c0ee0eaeb411 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 18 Feb 2024 18:19:39 +0100 Subject: [PATCH] add sonarr to media stack --- docker_swarm/roles/media/docker-stack.yml.j2 | 35 ++++++++++++++++++++ nixos/modules/data-sharing.nix | 1 + 2 files changed, 36 insertions(+) diff --git a/docker_swarm/roles/media/docker-stack.yml.j2 b/docker_swarm/roles/media/docker-stack.yml.j2 index 8e7fc88..566f69c 100644 --- a/docker_swarm/roles/media/docker-stack.yml.j2 +++ b/docker_swarm/roles/media/docker-stack.yml.j2 @@ -31,6 +31,11 @@ volumes: type: "nfs" o: "addr=lewis.dmz,nolock,soft,rw" device: ":/mnt/data/nfs/radarr/config" + sonarr_config: + driver_opts: + type: "nfs" + o: "addr=lewis.dmz,nolock,soft,rw" + device: ":/mnt/data/nfs/sonarr/config" prowlarr_config: driver_opts: type: "nfs" @@ -185,3 +190,33 @@ services: - traefik.http.routers.prowlarr.service=prowlarr - traefik.http.services.prowlarr.loadbalancer.server.port=9696 - traefik.docker.network=traefik + + sonarr: + image: lscr.io/linuxserver/sonarr:latest + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Amsterdam + volumes: + - type: volume + source: sonarr_config + target: /config + volume: + nocopy: true + - type: volume + source: media + target: /media + volume: + nocopy: true + networks: + - traefik + deploy: + labels: + - traefik.enable=true + - traefik.http.routers.sonarr.entrypoints=localsecure + - traefik.http.routers.sonarr.rule=Host(`sonarr.kun.is`) + - traefik.http.routers.sonarr.tls=true + - traefik.http.routers.sonarr.tls.certresolver=letsencrypt + - traefik.http.routers.sonarr.service=sonarr + - traefik.http.services.sonarr.loadbalancer.server.port=8989 + - traefik.docker.network=traefik diff --git a/nixos/modules/data-sharing.nix b/nixos/modules/data-sharing.nix index 8efb842..c97b79a 100644 --- a/nixos/modules/data-sharing.nix +++ b/nixos/modules/data-sharing.nix @@ -26,6 +26,7 @@ let "/jellyseerr/config" "/radarr/config" "/prowlarr/config" + "/sonarr/config" ]; nfsExports = lib.strings.concatLines (