docker-cloudflare-ddns icon indicating copy to clipboard operation
docker-cloudflare-ddns copied to clipboard

Update multiple sub-domains

Open ikkerus opened this issue 3 years ago • 3 comments

Unfortunately since a couple of updates of the "latest" repository the updates of the subodmains is not working anymore. I'm using it on unraid and it only updates the latest variable (subdomain 6). See also #79

image

ikkerus avatar Feb 04 '22 15:02 ikkerus

Same request here, it takes only the last "SUBDOMAIN" value, ignoring the orthers.

NdR91 avatar Feb 20 '22 20:02 NdR91

Same request here! This is one of the best docker for cloudflare ddns, It will be handy to launch just one image with all the subdomains rather than a image per subdomain.

What I did was to add docker-compose extension fields to simplify a little the tedious work. For each subdomain add an entry like:

    container_name: cf-ddns-SUBDOMAIN_NAME
    <<: *network-ddns-core
    environment:
      <<: *network-ddns-env
      SUBDOMAIN: "SUBDOMAIN_NAME" 

Where x-network-ddns-core is:

    image: oznu/cloudflare-ddns:latest
    secrets:
      - cf_api_key
      - cf_token_zone
    networks:
      - socket_proxy
    security_opt:
      - no-new-privileges:true
    restart: always 

and x-network-ddns-envv is:

    API_KEY_FILE: /run/secrets/cf_token_zone
    ZONE: $DOMAINNAME
    PROXIED: "true"
    RRTYPE: A
    DELETE_ON_STOP: "false" 

And are defined at the beginning of the docker-compose. I also have defined DOMAINNAE at .env file and cf_token_zone in secrets.

This is not an elegant solution. I have up to 8 subdomains, and each time I want to add new subdomain in traefik I must to create a new entry on docker-compose in this way.

Hope this workaround suits you.

backmind avatar Mar 01 '22 20:03 backmind

I solved launching multiple containers. Simply and it works very well.

sineverba avatar Apr 04 '22 05:04 sineverba