caddy-docker-proxy icon indicating copy to clipboard operation
caddy-docker-proxy copied to clipboard

Can't find how to escape . in directive

Open LeVraiRoiDHyrule opened this issue 10 months ago • 2 comments

Hi,

I am looking to translate the following config into docker proxy labels:

{
	dynamic_dns {
		provider cloudflare {env.CLOUDFLARE_API_TOKEN}
		domains {
			example.com
		}
	}
}

I tried the following:

      caddy.dynamic_dns.provider: cloudflare ${CADDY_CLOUDFLARE_DNSTOKEN}
      caddy.dynamic_dns.domains.mydomain.fr:

This gives the following result:

dynamic_dns {
		domains {
			mydomain {
				fr
			}
		}
		provider cloudflare REDACTED
	}

I can't find how to escape the . or how I should set the labels to achieve the expected result. Thanks in advance for any help, have a nice day

Side note : I think I will often have problems about how caddyfile configs translate into docker proxy labels. Is there a tool somewhere that can help for that ? Is there a place where I can get more examples for different types of configs ?

LeVraiRoiDHyrule avatar Feb 03 '25 13:02 LeVraiRoiDHyrule

Hi, would someone have an idea about this issue ?

I couldn't find any documentation about how to escape dots. ChatGPT told me to try replacing the dot with underscore, and with double underscores, none worked.

LeVraiRoiDHyrule avatar Feb 07 '25 15:02 LeVraiRoiDHyrule

Found this issue which is exactly my problem https://github.com/lucaslorentz/caddy-docker-proxy/issues/316 There is no solution yet, however

LeVraiRoiDHyrule avatar Feb 07 '25 16:02 LeVraiRoiDHyrule