From f2ab8b834685bb33e1e6570bdd003eb4567bb225 Mon Sep 17 00:00:00 2001 From: MSWS Date: Thu, 27 Mar 2025 22:18:33 -0700 Subject: [PATCH] feat: Configure reverse proxies and update Pi-hole restart policy - Update `Caddyfile` to include reverse proxies for `git.msws.xyz` and `*.code.msws.xyz`, and adjust proxy rules - Add auto-restart policy to Pi-hole container in `compose.yml` [caddy/Caddyfile] - Added a reverse proxy for `git.msws.xyz` pointing to `gitea-server-1:3000`. - Added a reverse proxy for subdomains under `*.code.msws.xyz` pointing to `code-server:8443`. - Adjusted general proxy rules to accommodate the new entries. - Commented out the redirect rule for `/` to `https://msws.github.io`. [pihole/compose.yml] - Added a `restart: always` policy to ensure the Pi-hole container restarts automatically if it stops. --- caddy/Caddyfile | 9 +++++++++ pihole/compose.yml | 1 + 2 files changed, 10 insertions(+) diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 823eb30..1bfbfa7 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -32,6 +32,14 @@ registry.msws.xyz { } } +git.msws.xyz { + reverse_proxy gitea-server-1:3000 +} + +*.code.msws.xyz { + reverse_proxy code-server:8443 +} + yt.local.msws.xyz, yt.msws.xyz { reverse_proxy invidious:3000 } @@ -65,4 +73,5 @@ photos.local.msws.xyz, photos.msws.xyz { reverse_proxy https://msws.github.io { header_up Host msws.github.io } + # redir / https://msws.github.io{uri} } diff --git a/pihole/compose.yml b/pihole/compose.yml index f6c9949..5bc7c7c 100644 --- a/pihole/compose.yml +++ b/pihole/compose.yml @@ -3,6 +3,7 @@ services: container_name: pihole image: pihole/pihole:latest network_mode: host + restart: always environment: TZ: "America/Los_Angeles" # Change this to your timezone WEBPASSWORD: ${WEB_PASSWORD} # Set the Pi-hole admin password