Open ericgroom opened 7 months ago
What does "doesn't work" mean? What error do you see? What's in your logs? Show an example request with curl -v
. Enable the debug
global option.
This may not be related, but I had the same issue where the caddy-docker-proxy
module was not loading. This resulted in labels not working. I fixed this by changing to the alpine
version of the caddy docker image.
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/lucaslorentz/caddy-docker-proxy/v2
FROM caddy:alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
CMD ["caddy", "docker-proxy"]
Probably a dumb configuration issue, but I think I have a minimal example and have double checked instructions. This reverse proxy works when configured via a Caddyfile, but not via the labels.
compose.yml
Dockerfile
Caddyfile
I've tried without a Caddyfile and get the same result; I'd like to keep it as I have some redirects I'd like to do outside of proxying to containers. I never see any log messages in the caddy container when spinning up containers using caddy labels so I assume it's not seeing them start up?
Any help debugging would be much appreciated!