Created tunnel network to keep cf tunnel isolated from homelab network

This commit is contained in:
2025-12-12 10:01:26 -05:00
parent 8f925b29c3
commit 9a06c52f27
2 changed files with 10 additions and 0 deletions

View File

@@ -2,9 +2,16 @@ services:
cloudflared:
image: cloudflare/cloudflared:latest
restart: unless-stopped
networks:
- 'default'
- 'tunnel'
volumes:
- ./config.yml:/etc/cloudflared/config.yml
- ./${TUNNEL_ID}.json:/etc/cloudflared/${TUNNEL_ID}.json # Use environment variable for tunnel ID
command: tunnel --no-autoupdate --config /etc/cloudflared/config.yml run
env_file:
- .env # Reference the .env file to inject environment variables
networks:
tunnel:
external: true