fix(tailscale): Use localhost and network_mode for Funnel/Serve
Some checks failed
/ validate-docker-compose (push) Has been cancelled

Tailscale Funnel/Serve requires proxying to localhost or 127.0.0.1.
This commit updates the target URL to http://localhost:80 and sets
network_mode to service:traefik to allow tailscale to correctly
forward traffic to the traefik container.
This commit is contained in:
Jose Daniel G. Percy 2025-04-25 11:00:16 +08:00
parent cc51dd386c
commit 63b62c15b3

View File

@ -514,6 +514,7 @@ services:
cap_add:
- NET_ADMIN
- NET_RAW
network_mode: service:traefik # Add this line
restart: always
command:
- /bin/sh
@ -540,11 +541,11 @@ services:
# Check the ENABLE_FUNNEL_HTTPS variable
if [ "${ENABLE_FUNNEL_HTTPS}" = "true" ]; then
echo "ENABLE_FUNNEL_HTTPS is true. Setting up Funnel -> http://traefik:80..."
tailscale funnel --bg http://traefik:80
tailscale funnel --bg http://localhost:80
echo "Tailscale Funnel configured."
else
echo "ENABLE_FUNNEL_HTTPS is false. Setting up Serve -> http://traefik:80..."
tailscale serve --bg http://traefik:80
tailscale serve --bg http://localhost:80
echo "Tailscale Serve configured."
fi
# --- End Tailscale Funnel/Serve ---