This Dockerfile will build Caddy with the Namecheap module located here.
This allows Caddy to use the Namecheap API to add DNS records on-the-fly to verify ownership of a domain you are trying to get an HTTPS certificate for.
GitHub Actions builds and pushes the image to DockerHub when a change to the repository is detected.
Full Caddyfile configuration examples can be found here
tls {
dns namecheap {
api_key {env.NAMECHEAP_API_KEY}
user {env.NAMECHEAP_API_USER}
}
}