feat: adding IPAM settings to docker compose and setting static ip to traefik

This commit is contained in:
Diego Noguês
2026-02-12 14:02:21 +01:00
parent 0a895ffc22
commit bf7bdf6c4f
+11 -1
View File
@@ -1289,6 +1289,9 @@ render_docker_compose_traefik_tcp() {
# Always rebuild to pick up code changes during testing # Always rebuild to pick up code changes during testing
pull_policy: build pull_policy: build
container_name: netbird-proxy container_name: netbird-proxy
# Hairpin NAT fix: route domain back to traefik's static IP within Docker
extra_hosts:
- \"$NETBIRD_DOMAIN:172.30.0.10\"
restart: unless-stopped restart: unless-stopped
networks: [netbird] networks: [netbird]
depends_on: depends_on:
@@ -1314,7 +1317,9 @@ services:
image: $TRAEFIK_IMAGE image: $TRAEFIK_IMAGE
container_name: netbird-traefik container_name: netbird-traefik
restart: unless-stopped restart: unless-stopped
networks: [netbird] networks:
netbird:
ipv4_address: 172.30.0.10
ports: ports:
- '443:443' - '443:443'
volumes: volumes:
@@ -1410,6 +1415,11 @@ volumes:
networks: networks:
netbird: netbird:
driver: bridge
ipam:
config:
- subnet: 172.30.0.0/24
gateway: 172.30.0.1
EOF EOF
return 0 return 0
} }