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

[feature] Support for environmental substitution in config.json

Open arulrajnet opened this issue 3 years ago • 11 comments

This PR has

  • support for environmental substitution in config.json using python Template. Refer comment in #35
  • Allow to run the scripts from root/any folder. For ex ./scripts/docker-build.sh

arulrajnet avatar Nov 13 '22 16:11 arulrajnet

@timothymiller tested the same in my setup https://github.com/arulrajnet/tamilillam.arulraj.net/blob/main/docker-compose.yml https://github.com/arulrajnet/tamilillam.arulraj.net/blob/main/conf/ddns/config.json

arulrajnet avatar Nov 13 '22 16:11 arulrajnet

@timothymiller Is there anything I am missing to merge this PR?

arulrajnet avatar Nov 18 '22 07:11 arulrajnet

@timothymiller do you actively maintain this project?

Seems no PR merged after Aug 2022

arulrajnet avatar Nov 21 '22 23:11 arulrajnet

👀

andres-pcg avatar Feb 09 '23 04:02 andres-pcg

┻━┻︵ (°□°)/ ︵ ┻━┻ Merging PRs tomorrow

timothymiller avatar Feb 09 '23 04:02 timothymiller

Very cool @arulrajnet! Can you update this PR so the feature works as an either or.

Example: If environment variables are defined, then skip parsing config.json

I'd like to keep backwards compatibility for users of the existing config.json method.

timothymiller avatar Feb 15 '23 20:02 timothymiller

I merged a few other PRs, one that added support for extracting IP from the network interface, instead of an HTTP request to Cloudflare. Would you mind syncing up with the master branch?

timothymiller avatar Feb 15 '23 21:02 timothymiller

@timothymiller Addressed all the comments.

  • skip parsing config.json if the environment variables are defined
  • Sync with master.

arulrajnet avatar Feb 21 '23 01:02 arulrajnet

@timothymiller could you review again?

arulrajnet avatar Mar 06 '23 09:03 arulrajnet

This is a pretty big deal for me, this'd allow me to not bind-mount config.json, and instead do all config via env variables.

A second PR could have a default config.json that can be overridden via bind mount.

yorickdowne avatar Oct 16 '23 12:10 yorickdowne

This is a pretty big deal for me, this'd allow me to not bind-mount config.json, and instead do all config via env variables.

A second PR could have a default config.json that can be overridden via bind mount.

Environment variables would also simplify things in my situation.

@timothymiller, I wanted to bring your attention back to this PR because it would be beneficial to my current home lab configuration. Is there any update on if/when this PR can be merged? Thanks!

shaunbharat avatar Jan 26 '24 19:01 shaunbharat