Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration for caddy-docker-proxy with caddy-dns/ovh #4

Open
SR-G opened this issue Oct 8, 2024 · 1 comment
Open

Configuration for caddy-docker-proxy with caddy-dns/ovh #4

SR-G opened this issue Oct 8, 2024 · 1 comment

Comments

@SR-G
Copy link

SR-G commented Oct 8, 2024

Hello.
Thanks for this plugin, seems to be exactly what i need.
However i'm struggling about configuring it :

  • i'm using https://github.com/lucaslorentz/caddy-docker-proxy, which is NOT compatible with Caddy JSON configuration, but only with Caddyfile flavor for the configuration
  • hopefully, the documentation here in the README.md provides a snippet for Caddyfile ... but i have 0 idea (even after reading a lot of online pages) how i should configure that in a global way in a Caddyfile :
    tls {
      dns ovh {
        endpoint ovh-eu
        application_key XXXXXXXXXXXXX
        application_secret XXXXXXXXXXXXXXXXXXXXXXX
        consumer_key XXXXXXXXXXXXXXXXXXX
      }
    }

Indeed, this seems to be the configuration to be added for each server ... but this is managed dynamically by caddy-docker-proxy, so i don't think i can go this way.

Then how should this be declared in a global way in a Caddyfile, whereas the Caddyfile structure does not seem to propose anything related to this ? (only things like acme_dns (https://caddyserver.com/docs/caddyfile/options#acme-dns), ...)

Thanks in advance for any help.

@SR-G
Copy link
Author

SR-G commented Oct 8, 2024

Ok, well, i think i've found how it works, at least with labels at container level (and not in a global way) - for reference, probably something like :

docker run -d --name=grafana -p 3000:3000 --volume grafana-storage:/var/lib/grafana --label "caddy=grafana.domain.ovh" --label "caddy.reverse_proxy={{upstreams 3000}}" \
  --label "caddy.tls.dns=ovh" \
  --label "caddy.tls.dns.endpoint=ovh-eu" \
  --label "caddy.tls.dns.application_key=XXXXXXXXXXXXXXXXXX" \
  --label "caddy.tls.dns.application_secret=XXXXXXXXXXXXXXXXX" \
  --label "caddy.tls.dns.consumer_key=XXXXXXXXXXXXXXX" \
  grafana/grafana

However a global configuration would definitely avoid a lot of redundancies - still don't know if it's possible or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant