#!/usr/bin/env bash
# The shared `traefik` network is created once, by hand, and every stack that
# wants to be published joins it as `external: true`. Fixed subnet so the
# other stacks can pin addresses inside it (10.0.4.0/26 here; the /29 blocks
# used by litellm and hermes live elsewhere in the same 10.0.4.0/24 plan).
docker network create \
  --driver=bridge \
  --subnet=10.0.4.0/26 \
  --gateway=10.0.4.1 \
  --opt com.docker.network.bridge.enable_icc=true \
  --opt com.docker.network.bridge.enable_ip_masquerade=true \
  --opt com.docker.network.bridge.name=traefik \
  --opt com.docker.network.driver.mtu=1500 \
  traefik
