Provide a programmatic way to update records that are managed by Digital Ocean's DNS servers.
Updating DNS records when you have a changing ip address.
This is a rewrite from scratch project which was inspired by bensquire's repository, with simplified and more readable code.
- Get an API TOKEN from 'Personal Access Token'.
- Copy
.env.exampleto.env - Add values to the following variables in the created
.env:WHAT_IS_MY_IP_URL- A GET request will be done to this url and parse the response using regex for IPv4 address
DIGITAL_OCEAN_TOKENDOMAIN_NAMESUBDOMAIN_NAMERTYPETTLRUN_EVERY- <= 0 run only once
- > 0 run every X seconds
- Manual run:
- Run
pip install requirements.txtto install the dependencies - Run
python3 app.pyto update the DNS record based on data from.env
- Run
- Run using docker:
docker-compose up