From cac48b49a10d3a62424989c8723be67a7d0c2fec Mon Sep 17 00:00:00 2001 From: "Andreas S. Turriff" Date: Sun, 23 Jun 2024 11:12:28 -0700 Subject: [PATCH] Media Server, Pt 8 --- mylar3.yaml | 31 +++++++++++++++++++ .../custom-cont-init.d/mylar3-listen.sh | 5 +++ 2 files changed, 36 insertions(+) create mode 100644 mylar3.yaml create mode 100755 scripts/mylar3/custom-cont-init.d/mylar3-listen.sh diff --git a/mylar3.yaml b/mylar3.yaml new file mode 100644 index 0000000..9691f51 --- /dev/null +++ b/mylar3.yaml @@ -0,0 +1,31 @@ + mylar3: + deploy: + labels: + traefik.enable: "true" + traefik.http.routers.mylar3-rtr.entrypoints: "websecure" + traefik.http.routers.mylar3-rtr.middlewares: "authentik@swarm" + traefik.http.routers.mylar3-rtr.rule: "Host(`mylar3.your.domain`)" + traefik.http.routers.mylar3-rtr.service: "mylar3" + traefik.http.services.mylar3.loadbalancer.server.port: "8090" + replicas: 1 + environment: + PUID: 10019 + PGID: 10002 + UMASK: 0002 + TZ: "Etc/UTC" + healthcheck: + test: "curl -f http://mylar3:8090" + interval: 2m + timeout: 5s + start_period: 20s + hostname: "mylar3" + image: "linuxserver/mylar3" + networks: + - homelab + restart: on-failure + volumes: + - "/srv/data/docker/mylar3/config:/config" + - "/srv/data/shared/usenet:/data/usenet" + - "/srv/data/shared/torrent:/data/torrent" + - "/srv/data/shared/media:/data/media" + - "/srv/data/docker/mylar3/custom-cont-init.d:/custom-cont-init.d" diff --git a/scripts/mylar3/custom-cont-init.d/mylar3-listen.sh b/scripts/mylar3/custom-cont-init.d/mylar3-listen.sh new file mode 100755 index 0000000..bd48886 --- /dev/null +++ b/scripts/mylar3/custom-cont-init.d/mylar3-listen.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export LOCAL_IP=$(ip addr | grep -E 'inet 10\.64\..*/16' | sed -e 's|.*\(10\.64\..*\..*\)/16.*|\1|') + +sed -i -e "/http_host/s| = .*\..*\..*\..*| = ${LOCAL_IP}|" /config/mylar/config.ini