Open cirrusflyer opened 3 months ago
This plugin just produces Caddyfile config. If you can do it with a Caddyfile, you can do it with this. You just need to transform it to Docker labels.
Thanks, after finding this and getting it to work, I think I understand better now.
https://github.com/homeall/caddy-reverse-proxy-cloudflare
Can this work with an existing Caddyfile in addition to these dynamically generated ones? I assume not, but making sure I understand completely.
Can this work with an existing Caddyfile in addition to these dynamically generated ones?
If you just want to add some Caddyfile
contents of your own you could mount separate files into the CDP image and use the import
directive as a label to add such.
Caddyfile
, then add that to the container and use the ENV CADDY_DOCKER_CADDYFILE_PATH
to reference it.import
, the path might need to be absolute, any nested imports can be relative from that. Or just import
snippets from the base Caddyfile
to avoid paths in the labels👍 import
may need to be quoted appropriately to work. Likewise be careful of typos which may introduce invalid config but silently "fixed" by CDP.
I've downloaded a custom build that includes this plugin and the Cloudflare plugin. It works with manually configured sites using the Caddyfile using DNS challenge. I'm not sure how to get it to work with containers configured to use caddy-docker-plugin, or even if it's possible. Any help would be appreciated.