First run: create caddy network for other stacks to attach to:
docker network create caddyStart the proxy
docker compose upIntegrating with other stacks:
Add the external network:
networks:
caddy:
external: trueAdd the caddy network and labels to the services you want to proxy:
services:
app:
networks:
- default
- caddy
labels:
caddy: example.localhost # The domain this app should use.
caddy.reverse_proxy: "{{upstreams 80}}" # The internal port that the container is listening on.