About doapi
doapi lists, creates and deletes DNS records in a DigitalOcean account. It runs as a container with your DigitalOcean API token and answers three requests on /dns: GET lists every domain with its records, POST creates a record, and DELETE removes one by its id. The same commands work from the command line with docker exec.
It's for other containers that need to change DNS, for example to set an _acme-challenge record for a certificate, without each of them holding the DigitalOcean token. mailio uses it to publish its DKIM, SPF and DMARC records.
There's no authentication: anything that can reach doapi can change your DNS. Keep it on a private Docker network with the services that use it, and don't publish its port.
Run it
docker network create doapi-net
docker run -d --name doapi \
--network doapi-net \
-e DO_TOKEN="$DO_TOKEN" \
ghcr.io/reeywhaar/doapi:latest
# list every domain and its records
docker exec doapi /doapi dns list
Configuration, backups and the rest are in the README.