Add domain management system

Implements a declarative domain orchestrator that reads ops/domains.yaml
and automatically applies DNS and forwarding configuration via GoDaddy
and Cloudflare APIs.

Features:
- YAML-based configuration for all domains (ops/domains.yaml)
- Python script to apply changes idempotently (ops/scripts/apply_domains.py)
- GitHub Actions workflow to sync on YAML changes (sync-domains.yml)
- Optional health check workflow (domain-health.yml)
- Comprehensive documentation (docs/domains-overview.md)

The system supports:
- GoDaddy: DNS records and 301 forwarding
- Cloudflare: DNS records (CNAME, A)

All API credentials are read from GitHub secrets (GODADDY_API_KEY,
GODADDY_API_SECRET, CLOUDFLARE_TOKEN).
This commit is contained in:
Claude
2025-11-17 04:32:34 +00:00
parent 13e554f11e
commit a23ec040f1
5 changed files with 462 additions and 0 deletions

57
ops/domains.yaml Normal file
View File

@@ -0,0 +1,57 @@
# Universal domain registry configuration
# Each entry describes how a domain or subdomain should be handled.
# Supported providers: "godaddy", "cloudflare"
# Supported modes:
# - forward: use registrar forwarding (HTTPS 301)
# - dns: set DNS records (CNAME or A)
domains:
- name: "blackroad.systems"
type: "root"
provider: "godaddy"
mode: "forward"
forward_to: "https://os.blackroad.systems"
forwarding_type: 301
- name: "www.blackroad.systems"
type: "subdomain"
provider: "godaddy"
mode: "forward"
forward_to: "https://os.blackroad.systems"
forwarding_type: 301
- name: "os.blackroad.systems"
type: "subdomain"
provider: "godaddy"
mode: "dns"
record:
type: "CNAME"
value: "YOUR-PROD-RAILWAY-APP.up.railway.app" # replace with your Railway host
- name: "blackroad.ai"
type: "root"
provider: "cloudflare"
mode: "dns"
record:
type: "CNAME"
value: "os.blackroad.systems"
- name: "roadwallet.com"
type: "root"
provider: "cloudflare"
mode: "dns"
record:
type: "CNAME"
value: "os.blackroad.systems"
- name: "aliceos.io"
type: "root"
provider: "cloudflare"
mode: "dns"
record:
type: "CNAME"
value: "os.blackroad.systems"
# Add additional domains or subdomains here following the same pattern.
# By default you can set mode: "dns" with a CNAME pointing to os.blackroad.systems,
# or override as needed.