fix: Caddyfile with localhost

This commit is contained in:
sauravdhakal12
2026-03-30 15:32:02 +00:00
parent 2ba0ab5009
commit 756165e975
2 changed files with 8 additions and 13 deletions

View File

@@ -18,13 +18,13 @@
# Public — only webhook endpoint, no UI # Public — only webhook endpoint, no UI
n8n.sauravdhakal.com.np { n8n.sauravdhakal.com.np {
reverse_proxy n8n:5678 { reverse_proxy localhost:5678 {
# Only allow webhook paths publicly # Only allow webhook paths publicly
header_up Host {host} header_up Host {host}
} }
@public path /webhook/* /webhook-test/* @public path /webhook/* /webhook-test/*
handle @public { handle @public {
reverse_proxy n8n:5678 reverse_proxy localhost:5678
} }
handle { handle {
abort # block everything else (UI, API, etc) abort # block everything else (UI, API, etc)
@@ -34,7 +34,7 @@ n8n.sauravdhakal.com.np {
# Private — full n8n UI through VPN # Private — full n8n UI through VPN
n8n-admin.sauravdhakal.com.np { n8n-admin.sauravdhakal.com.np {
bind 100.81.85.182 bind 100.81.85.182
reverse_proxy n8n:5678 reverse_proxy localhost:5678
} }
# ----------------------------------------------- # -----------------------------------------------
@@ -44,20 +44,20 @@ n8n-admin.sauravdhakal.com.np {
vault.sauravdhakal.com.np { vault.sauravdhakal.com.np {
bind 100.81.85.182 bind 100.81.85.182
reverse_proxy vaultwarden:80 reverse_proxy localhost:8080
} }
actual.sauravdhakal.com.np { actual.sauravdhakal.com.np {
bind 100.81.85.182 bind 100.81.85.182
reverse_proxy actual:5006 reverse_proxy localhost:8081
} }
immich.sauravdhakal.com.np { immich.sauravdhakal.com.np {
bind 100.81.85.182 bind 100.81.85.182
reverse_proxy immich-server:2283 reverse_proxy immich-server:8082
} }
filebrowser.sauravdhakal.com.np { filebrowser.sauravdhakal.com.np {
bind 100.81.85.182 bind 100.81.85.182
reverse_proxy filebrowser:80 reverse_proxy filebrowser:8083
} }

View File

@@ -2,18 +2,13 @@ services:
caddy: caddy:
build: ../caddy build: ../caddy
restart: unless-stopped restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "100.81.85.182:443:443" # VPN interface for private services
environment: environment:
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN} - CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
volumes: volumes:
- ../caddy/Caddyfile:/etc/caddy/Caddyfile - ../caddy/Caddyfile:/etc/caddy/Caddyfile
- ../caddy/data:/data - ../caddy/data:/data
- ../caddy/config:/config - ../caddy/config:/config
networks: network_mode: host # Caddy sees ALL host interfaces including Netbird
- caddy_net
networks: networks:
caddy_net: caddy_net: