Skip to content

g0v-network/domains

Folders and files

NameName
Last commit message
Last commit date
Mar 24, 2023
Jan 27, 2023
Mar 24, 2023
Feb 22, 2022
Feb 20, 2022
Mar 24, 2023
Apr 24, 2022
Oct 28, 2022
Feb 22, 2022
Mar 15, 2021
Mar 15, 2021
Mar 24, 2023
Mar 24, 2023
Oct 28, 2022
Mar 24, 2023
Feb 7, 2021

Repository files navigation

g0v.network domains domain-sync

For automating management of some g0v-related domains via config files.

The following damains can be managed here:

  • g0v.network
  • g0v.ca
  • g0v.london
  • c4nada.ca
  • t0ronto.ca
  • g0teborg.se
  • newspeak.link

Changing or adding DNS records in main branch of this repository will update the actual domain records.

Inspired by g0v/domain. Future intention is to adopt g0v domain guidelines (English translation).

Table of Contents

🛠️ Technologies Used

  • YAML. A human-friendly configuration file format.
  • octoDNS. Command-line tool to update domain records from files -- infra-as-code!
  • GitHub Actions. Continuous integration platform to run automation in the cloud.

🎈 Usage

The intended way to use this repository is directly via pull request on GitHub.

For support in making common DNS changes and adding new domains, see docs/HOWTO.md.

To learn to submit changes, see Contributing

(You should only need to clone this code locally if working on the automation itself. See Development section.)

👩‍💻 Development

To contribute changes to our automation, you'll likely want to be able to run it locally. Here's what you'll need:

Prerequisites
  • Install Python 3
  • Install make
  • Install pipenv.
  • Register a Cloudflare user account
    • any non-special account will do
  • Add each Cloudflare domain/zone/website (those mentioned above)
    • you can "fake it" by initiating the import process, without activating (ie. no need to have access to the actual domain)
  • Generate a properly scoped Cloudflare API token
    • Documentation for creating tokens in your profile
    • Permissions: Zone | DNS | Edit
    • Zone Resources: Include | Specific zone | example.com for each zone/domain
      • Alternatively: Include | All zones from an account

To get started with this repo:

git clone https://github.com/g0v-network/domains
cd domains

For a list of all support commands available via make, type:

make

To run your first commands:

make setup

# Validate your config locally
make validate

# Copy and modify as needed with API token
cp sample.env .env

# Do a dry run against Cloudflare (no changes will be made)
make dry-run

# Do a REAL run (!!!)
#
# WARNING: this is destructive, and will delete any records on a domain that
# are not present in your configuration files.
make run

💪 Contributing

Please open an issue or pull request in order to create/update/delete any subdomains.

See docs/HOWTO.md for detailed instructions.

©️ License

CC0 1.0 Universal

About

To manage domains and subdomain DNS records for g0v-related domains (and friends)

Resources

Stars

Watchers

Forks