• dazchad@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I suppose wildcard DNS would not work for you?

    I have a *.svr.domain.tld on Google Domains (need to transfer somewhere else), and then on Caddyfile I can register individual foo.svr.domain.tld without touching DNS

    • Mr-Mars-Machine@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That’s a very good one! I hadn’t thought about it that way. Anyway, if there was some similar tool for Caddy it would be great. Thanks for your comment.

      • Wreid23@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Put your request in caddy forums and tag mholt he is very responsive . You could also sign up for open ai (chat gpt) feed it the compose.yml file in that github and ask it “what does this yml do” let it answer then ask “what modifications would be needed to make a similar script or yml that uses caddy in stead of traffik” when it gives you a working output (try it ) and go back to forums and say I want to make somethng like this and get feedback . Rinse and repeat and it may already exist as a combo of adding caddy packages + you just need the right caddyfile or json + addons to work with what may already exist as a feature with some docker tweaks

  • AnApexBread@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Why not just use the Cloudflare Tunnels command line binary?

    It can automatically create the CNAMEs

  • funfungo0dg0od@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Interesting question actually.

    From what I know, there is very few solutions for this purpose. I haven’t found a direct way to update DNS records from docker containers, without a lot of crafting.

    I toyed with registrator but it’s not updated since a long time (https://github.com/gliderlabs/registrator). The idea is to plug container to another backend, etc/consul. For internal traffic, it’s good but if you want to publicly expose the zone, probably need to setup a real DNS server as proxy. Well a lots of setup, especially if you want internet exposition .

    This guy tried an interesting thing, still involving Consul, but it look like what I could publicly expose on internet: https://ilhicas.com/2023/01/25/Creating-a-core-dns-with-consul-docker-image.html

    I’ve also seen that: https://github.com/rlipscombe/dockerns , wich is interesting for service discovery, but probably not more.

    This is good also: https://github.com/phensley/docker-dns

    On my side, I started a little python project that watch docker events, scan container labels, and send a nsupdate add/del records to another DNS server that accept dnsupdate. The smartest approach on my side, but it relies on a quick and dirty script I wrote. If I take time to rewrite it, I guess it could be a good solution for every one. Ho and it also solve the dual-dns issue, as you can forward different records to different servers.

    If you feel I interested, I can publish my python project :)