Skip to content

Commit 9961e2f

Browse files
Copy over DNS from Cloufdlare
0 parents  commit 9961e2f

File tree

6 files changed

+3488
-0
lines changed

6 files changed

+3488
-0
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Click on any site in the Cloudflare dashboard and you'll see
2+
# the "Account ID" on the lower right side of the page.
3+
CLOUDFLARE_ACCOUNT_ID=foo
4+
# https://dash.cloudflare.com/profile/api-tokens
5+
CLOUDFLARE_API_TOKEN=bar

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Babel's DNS records
2+
3+
- babeljs.io, managed by Cloudflare
4+
- babeljs.com, managed by Cloudflare
5+
- babel.dev, managed by Cloudflare
6+
7+
This repository uses [DNSControl](https://dnscontrol.org/) to manage DNS through Git,
8+
making it easier to track changes and collaborate.
9+
10+
## Commands
11+
12+
Before running these commands, you need to copy the `.env.example` file to `.env` and fill in the required values.
13+
14+
**Preview changes**
15+
16+
After updating the DNS configuration, youn can preview the actual changes that it will cause.
17+
18+
```
19+
docker run --rm -it -v "$(pwd):/dns" --env-file .env ghcr.io/stackexchange/dnscontrol:4.18.0 preview
20+
```
21+
22+
**Push changes**
23+
24+
After previewing the changes, you can push them to the DNS provider.
25+
26+
```
27+
docker run --rm -it -v "$(pwd):/dns" --env-file .env ghcr.io/stackexchange/dnscontrol:4.18.0 push
28+
```
29+
30+
**Re-generate `./types-dnscontrol.d.ts`**
31+
32+
This is only needed when upgrading DNSControl.
33+
34+
```
35+
docker run --rm -it -v "$(pwd):/dns" ghcr.io/stackexchange/dnscontrol:4.18.0 write-types
36+
```
37+

creds.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cloudflare": {
3+
"TYPE": "CLOUDFLAREAPI",
4+
"accountid": "$CLOUDFLARE_ACCOUNT_ID",
5+
"apitoken": "$CLOUDFLARE_API_TOKEN"
6+
}
7+
}

dnsconfig.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// @ts-check
2+
/// <reference path="types-dnscontrol.d.ts" />
3+
4+
var REG_NONE = NewRegistrar("none");
5+
var DNS_CLOUDFLARE = NewDnsProvider("cloudflare");
6+
7+
DEFAULTS(
8+
CF_PROXY_DEFAULT_OFF // turn off the orange cloud
9+
);
10+
11+
D("babeljs.io", REG_NONE, DnsProvider(DNS_CLOUDFLARE),
12+
// babeljs.io website
13+
A("@", "3.124.100.143"),
14+
A("@", "3.125.36.175"),
15+
CNAME("www", "babel.netlify.app."),
16+
CNAME("new", "babel.netlify.app."),
17+
CNAME("next", "babel-next.netlify.app."),
18+
CNAME("old", "babel-old.netlify.com."),
19+
CNAME("v6", "babel-old.netlify.com."),
20+
21+
// Slack
22+
CNAME("_acme-challenge.slack", "ad7c4b8d-f2dc-456b-8da0-80caef61f449.acme.d.sb."),
23+
CNAME("slack", "babel-slack-invite-link.netlify.app."),
24+
25+
// Email
26+
CNAME("verify60970", "mailgun.org."),
27+
MX("@", 10, "mxa.mailgun.org."),
28+
MX("@", 10, "mxb.mailgun.org."),
29+
TXT("@", "v=spf1 include:mailgun.org ~all"),
30+
TXT("pic._domainkey", "k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzOdtkSzaHBIBklk/c49YKjxYlyWJYftaV+qvgJcndKgg88XlTi1HaZVkb+2L1J1GzCZy3aNHv5OxXquRUB4NqSD6g9D9rO9ytvogwFavic/UoI5RxDpUs1XWA+ZVRnDtRXuinJeq9ZRqEp6BAqUCVdsntT5zkGCcdihb/hfM4Qgfnd33T7LDfVQLiCmxgqaCqlTKkNrxnE5R4dwHTO16Xw7FDibgsiXMriIu2zn0peTTnpgRGsTOPKnI8lquKKQrfmYh1P4ViMKbq2gvPL5NPvLtgGmw77RHHapYasrEkJfTEGPvHslsnqJNhCzbHgFzCSHqKBHXnSVKjWCikcE5WQIDAQAB"),
31+
32+
// Other
33+
CNAME("discuss", "hosted-vh1.discourse.org."),
34+
CNAME("podcast", "babel-podcast.netlify.com."),
35+
CNAME("donate", "babeljs.io."), // Will redirect to OpenCollective
36+
37+
// ???
38+
TXT("@", "google-site-verification=P2hE7IscrrfmQWVSQm1_QSB7rXxuKYDm3S5r2if9qkY"), // Google Workspace?
39+
TXT("_github-challenge-babel", "5d7d8ba399"), // GitHub pages?
40+
);
41+
42+
D("babeljs.com", REG_NONE, DnsProvider(DNS_CLOUDFLARE),
43+
A("@", "3.124.100.143"),
44+
A("@", "3.125.36.175"),
45+
CNAME("www", "babeljs.io."),
46+
);
47+
48+
D("babel.dev", REG_NONE, DnsProvider(DNS_CLOUDFLARE),
49+
// babel.dev website
50+
A("@", "54.177.145.149"),
51+
A("@", "54.67.4.46"),
52+
A("www", "54.177.145.149"),
53+
A("www", "54.67.4.46"),
54+
AAAA("@", "2600:1f1c:446:4900::1f4"),
55+
AAAA("@", "2600:1f1c:446:4901::1f4"),
56+
AAAA("www", "2600:1f1c:446:4900::1f4"),
57+
AAAA("www", "2600:1f1c:446:4901::1f4"),
58+
);
59+
60+
// Bluesky
61+
var blueskyDid = "did=did:plc:zpbxe3xx3km2ca65meuzjioa";
62+
D_EXTEND("babeljs.io", TXT("_atproto", blueskyDid));
63+
D_EXTEND("babel.dev", TXT("_atproto", blueskyDid));

0 commit comments

Comments
 (0)