Code Monkey home page Code Monkey logo

Comments (7)

jt196 avatar jt196 commented on May 29, 2024 1

I can see this hasn't been updated for a while, but I thought I'd give some feedback here. I've just set this up using docker compose, and as far as I can see it's working, so thanks for taking the time to write the script.

Here's my working docker-compose file:

## Development docker-compose
version: "3.7"
services:
  cloudflare-ddns:
    image: ghcr.io/akarys42/cloudflare-ddns-docker
    container_name: cloudflare-ddns
    environment:
      - CF_DDNS_TOKEN=<my_token>
      - CF_DDNS_DELAY=1 hour
      - CF_DDNS_DOMAINS=<my_domain>.com

A little feedback here:

  1. Some documentation on the delay would be useful, perhaps include in an example. I had to dig around into the utils.py file, and needed to not use quotation marks around the string for it to work!
  2. Some user feedback in the logs would also be useful. e.g. "IP Address: 82.22.12.131, updating DNS records!" I don't know if they check if it's the same or not...
  3. I'm assuming that wildcard records formatting is something like this: - CF_DDNS_DOMAINS=*.<my_domain>.com, this seems to be working correctly and not erroring out.

from cloudflare-ddns-docker.

Akarys42 avatar Akarys42 commented on May 29, 2024

Hello @xeviff! Thank you for opening an issue.

This would indeed be a correct way to start the project. I would recommend you to either supply all your parameters using env vars or command line arguments. For example:

docker run --name ddns_client --rm \
-e CF_DDNS_DOMAINS="mydomain.cat *.mydomain.cat mail.mydomain.cat" \
-e CF_DDNS_TOKEN="[REDACTED]" \
-d ghcr.io/akarys42/cloudflare-ddns-docker 

or

docker run --name ddns_client --rm \
-d ghcr.io/akarys42/cloudflare-ddns-docker \
-k [REDACTED] \
mydomain.cat *.mydomain.cat mail.mydomain.cat

In a docker-compose, you should be able to a similar thing:

version: "3.7"
services:
  cloudflare-ddns:
    image: ghcr.io/akarys42/cloudflare-ddns-docker
    container_name: ddns_client
    enviroment:
      CF_DDNS_DOMAINS: "mydomain.cat *.mydomain.cat mail.mydomain.cat" 
      CF_DDNS_TOKEN: "[REDACTED]" 

That said, I 100% agree that this project is lacking proper setup instructions. So here is what I'm thinking:

  • Add the three examples above to the README
  • Rename docker-compose.yaml to dev-docker-compose.yaml
  • Maybe add an example docker-compose.yaml file?

Would you be interested in making those changes?


Also it seemed like you passed an actual token in your original comment. I took the liberty to redact it just in case, but if it was valid please do roll it right now.

from cloudflare-ddns-docker.

xeviff avatar xeviff commented on May 29, 2024

Hello @Akarys42 !! Thank you very much for your response.
I apreciate your concern about my token but I changed some characters in order to not provide a real token.

You proposed interesting changes and if I have some free time I'll put them into a pull request.
Regards

from cloudflare-ddns-docker.

Akarys42 avatar Akarys42 commented on May 29, 2024

from cloudflare-ddns-docker.

xeviff avatar xeviff commented on May 29, 2024

Nice! Thank you so much to give this update. I tried and it works.
Also for many domains, the space works without quotation marks
- CF_DDNS_DOMAINS=domain1.cat *.domain1.cat mail.domain1.cat domain2.tv *.domain2.tv

from cloudflare-ddns-docker.

neurosurgeon avatar neurosurgeon commented on May 29, 2024

I'm getting this error with the above docker compose:
services.cloudflare-ddns Additional property enviroment is not allowed


version: "3.7"
services:
cloudflare-ddns:
image: ghcr.io/akarys42/cloudflare-ddns-docker
container_name: ddns_client
enviroment:
CF_DDNS_DOMAINS: "mydomain.cat *.mydomain.cat mail.mydomain.cat"
CF_DDNS_TOKEN: "[REDACTED]"

from cloudflare-ddns-docker.

neurosurgeon avatar neurosurgeon commented on May 29, 2024

I'm getting this error with the above docker compose: services.cloudflare-ddns Additional property enviroment is not allowed

version: "3.7" services: cloudflare-ddns: image: ghcr.io/akarys42/cloudflare-ddns-docker container_name: ddns_client enviroment: CF_DDNS_DOMAINS: "mydomain.cat *.mydomain.cat mail.mydomain.cat" CF_DDNS_TOKEN: "[REDACTED]"

Figured it out: environment was misspelled. This was from one of the above posts and I copied it without double checking.

from cloudflare-ddns-docker.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.