docker-cloudflare-ddns/README.md

34 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2019-03-05 19:16:45 +00:00
# Docker Cloudfare DDNS
2019-03-05 19:15:08 +00:00
Simple Docker image that wraps an example script to dynamically update a Cloudflare DNS record.
2019-03-05 19:16:45 +00:00
## Usage
There are two things to configure. First, the domain that you wish to update needs to be provided as a command line argument. This can be done by adding it to the end of your run command (example in the Makefile) or by adding it as a command to your compose file. Eg:
2019-03-05 19:16:45 +00:00
ddns:
image: IamTheFij/cloudflare-ddns
command: ["example.com"]
2019-03-05 19:16:45 +00:00
Your Cloudflare credentials can be passed in any way that [python-cloudflare](https://github.com/cloudflare/python-cloudflare) allows. Generally, either via envioronment variables:
2019-03-05 19:16:45 +00:00
CF_API_EMAIL=admin@example.com # Do not set if using an API Token
CF_API_KEY=00000000000000000000
CF_API_CERTKEY='v1.0-...'
2019-03-05 19:16:45 +00:00
Or by providing a file mounted to the working directory in the image, `/src/.cloudflare.cfg` that contains something like:
2019-03-05 19:16:45 +00:00
[CloudFlare]
emal = admin@example.com # Do not set if using an API Token
token = 00000000000000000000
certtoken = v1.0-...
2019-03-05 19:16:45 +00:00
Then run. To execute from this directory, you can use the convenient Make target.
make run
## Source
Original source: https://git.iamthefij.com/iamthefij/docker-cloudflare-ddns
Github mirror: https://github.com/iamthefij/docker-cloudflare-ddns