From 2631d8d5ebcbb9d65bd313f34dcf4b587c309086 Mon Sep 17 00:00:00 2001 From: Adrien Poupa Date: Sun, 26 Mar 2023 17:37:11 -0400 Subject: [PATCH] feat: simplify Traefik rules and default to hostname localhost --- .env.example | 2 +- README.md | 4 ++-- docker-compose.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 4ece765..a688432 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,7 @@ PIA_LOCATION=ca PIA_USER= PIA_PASS= PIA_LOCAL_NETWORK="192.168.0.0/16" -HOSTNAME= +HOSTNAME=localhost ADGUARD_HOSTNAME= DNS_CHALLENGE_PROVIDER=cloudflare LETS_ENCRYPT_EMAIL= diff --git a/README.md b/README.md index a34c661..75a6f77 100644 --- a/README.md +++ b/README.md @@ -81,9 +81,9 @@ For the first time, run `./update-config.sh` to update the applications base URL | `PIA_USER` | PIA username | | | `PIA_PASS` | PIA password | | | `PIA_LOCAL_NETWORK` | PIA local network | `192.168.0.0/16` | -| `HOSTNAME` | Hostname of the NAS, could be a local IP or a domain name | | +| `HOSTNAME` | Hostname of the NAS, could be a local IP or a domain name | `localhost` | | `ADGUARD_HOSTNAME` | AdGuard Home hostname used, if enabled | | -| `DNS_CHALLENGE_PROVIDER` | Provider for DNS01 challenge, [see list here](https://doc.traefik.io/traefik/https/acme/#providers). | `cloudflare` | +| `DNS_CHALLENGE_PROVIDER` | Provider for DNS01 challenge, [see list here](https://doc.traefik.io/traefik/https/acme/#providers). | `cloudflare` | | `LETS_ENCRYPT_EMAIL` | E-mail address used to send expiration notifications | | | `CLOUDFLARE_EMAIL` | CloudFlare Account email | | | `CLOUDFLARE_DNS_API_TOKEN` | API token with `DNS:Edit` permission | | diff --git a/docker-compose.yml b/docker-compose.yml index fe138ca..d05657f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: restart: always labels: - traefik.enable=true - - traefik.http.routers.sonarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/sonarr`) || PathPrefix(`/sonarr`)) + - traefik.http.routers.sonarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/sonarr`)) - traefik.http.routers.sonarr.tls=true - traefik.http.routers.sonarr.tls.certresolver=myresolver - traefik.http.services.sonarr.loadbalancer.server.port=8989 @@ -59,7 +59,7 @@ services: restart: always labels: - traefik.enable=true - - traefik.http.routers.radarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/radarr`) || PathPrefix(`/radarr`)) + - traefik.http.routers.radarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/radarr`)) - traefik.http.routers.radarr.tls=true - traefik.http.routers.radarr.tls.certresolver=myresolver - traefik.http.services.radarr.loadbalancer.server.port=7878 @@ -75,7 +75,7 @@ services: restart: always labels: - traefik.enable=true - - traefik.http.routers.prowlarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/prowlarr`) || PathPrefix(`/prowlarr`)) + - traefik.http.routers.prowlarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/prowlarr`)) - traefik.http.routers.prowlarr.tls=true - traefik.http.routers.prowlarr.tls.certresolver=myresolver - traefik.http.services.prowlarr.loadbalancer.server.port=9696 @@ -96,7 +96,7 @@ services: - vpn labels: - traefik.enable=true - - traefik.http.routers.qbittorrent.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/qbittorrent`) || PathPrefix(`/qbittorrent`)) + - traefik.http.routers.qbittorrent.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/qbittorrent`)) - traefik.http.routers.qbittorrent.tls=true - traefik.http.routers.qbittorrent.tls.certresolver=myresolver - traefik.http.services.qbittorrent.loadbalancer.server.port=8080 @@ -160,7 +160,7 @@ services: restart: always labels: - traefik.enable=true - - traefik.http.routers.jellyfin.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/jellyfin`) || PathPrefix(`/jellyfin`)) + - traefik.http.routers.jellyfin.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/jellyfin`)) - traefik.http.routers.jellyfin.tls=true - traefik.http.routers.jellyfin.tls.certresolver=myresolver - traefik.http.services.jellyfin.loadbalancer.server.port=8096