This repository holds a reproducible configuration of the DNS zone for each domain I have.
The configuration is managed through dnscontrol
and deployed by a GitHub Action
upon merges to the master
branch.
All changes on DNS records are done via this repository.
Clone the repository and create a creds.local.json
at the root.
Then, configure the credentials for:
The steps to obtain the credentials for each provider are listed on the relevant documentation pages.
For more information about the credentials file, please visit this page.
Then, create a .env
file with the location of the local credentials file:
DNSCONTROL_LOCAL_CREDS=creds.local.json
Docker is required as dnscontrol
is used through Docker.
To get the list of available commands, execute make help
(or make
).
make version
This command allows you to quickly check which version of DNSControl is being used.
make check
This command allows you to check and validate the syntax of the DNS zones' configuration.
CRED_KEY=cred_name make check-creds
This command performs a small operation to verify a service provider's credentials.
The environment variable CRED_KEY
must be defined and must contain the name of the credential you want to test, as defined in the local credentials file (creds.local.json
).
Example:
CRED_KEY=ovh make check-creds
make preview
This command reads the configuration and shows the changes that need to be made, without applying them.
As a precautionary measure, it is not possible to apply the changes manually. You should first create a PR and then merge it to master
.
The master
branch is protected, it only accepts merges from PRs.
You must first create a branch, then make your changes there and create a PR.
Secrets are defined as environment's secrets on GitHub, and are used in the creds.json
file.
Hero image provided by: https://siteground.com/ (thanks to them!)