First run: create caddy network for other stacks to attach to:
docker network create caddy
Start the proxy
docker compose up
Integrating with other stacks:
Add the external network:
networks:
caddy:
external: true
Add 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.