Test site: DNS moves to the fleet nameservers, no Cloudflare proxy
Deploy test site / deploy (push) Successful in 1m4s
Deploy test site / deploy (push) Successful in 1m4s
cnxvinyl.lol's zone now lives in cnx-network-clan (ns1/ns2.cnx.network), pointing straight at s1; mail is on mx1. Live once the nameservers at Porkbun are switched. - site/Caddyfile mirrors what s1 runs (checked 2026-10-23): no cloudflare_only or security_headers imports; Caddy gets its own certs. - deploy-site.yml: drop the Cloudflare cache purge step and its secrets. - site/README.md and digital-factory.md: DNS and certificate notes.
This commit is contained in:
1 parent
1f532d0c85
commit
f6829417a0
4 files changed
+19
-47
No files matched your search
+10
-13
@@ -3,7 +3,7 @@
|
||||
`https://cnxvinyl.lol/` is the internal test site for this repository: demo
|
||||
pages from `docs/` (the [plant operation page](../docs/plant-operation.html)
|
||||
first) and any static site we want to show by link. It runs on the same web
|
||||
server as buildfor.life (Debian VPS `s1`, Caddy behind Cloudflare) and is
|
||||
server as buildfor.life (Debian VPS `s1`, Caddy; not behind Cloudflare) and is
|
||||
not a plant service; plant systems follow the
|
||||
[digital factory plan](../docs/digital-factory.md). Every page and file is
|
||||
sent with `noindex` and `robots.txt` disallows everything; nothing is behind
|
||||
@@ -30,8 +30,7 @@ touches `site/`, an HTML page under `docs/`, or the workflow itself, and on
|
||||
demand (Actions tab, "Run workflow"). It builds, rsyncs `site/dist` into
|
||||
the idle one of `/var/www/cnxvinyl.lol` and `/var/www/cnxvinyl.lol-prev`,
|
||||
swaps them by rename (the blog's pattern), checks `version.txt` on the
|
||||
server, purges the Cloudflare cache when the token is set, and finally
|
||||
checks the public URL (warning only).
|
||||
server, and finally checks the public URL (warning only).
|
||||
|
||||
The deploy owns the whole web root: anything put into
|
||||
`/var/www/cnxvinyl.lol` by hand disappears on the next deploy. Static sites
|
||||
@@ -39,15 +38,14 @@ go into `public/` instead.
|
||||
|
||||
## One-time setup
|
||||
|
||||
1. DNS in Cloudflare, both proxied (orange cloud):
|
||||
`cnxvinyl.lol CNAME s1.buildfor.life` and `www CNAME cnxvinyl.lol`
|
||||
(Cloudflare flattens the apex CNAME, so the site follows s1 if its
|
||||
address changes). SSL/TLS mode **Full (strict)**: "Flexible" makes a
|
||||
redirect loop with Caddy.
|
||||
1. DNS: the zone is in the cnx-network-clan repo
|
||||
(`modules/dns/zones/cnxvinyl.lol.zone`, served by `ns1`/`ns2.cnx.network`,
|
||||
October 2026; until then it was Cloudflare): apex A/AAAA straight at s1
|
||||
and `www CNAME cnxvinyl.lol`. If s1's address changes, change it there.
|
||||
2. Caddy on s1: append [`Caddyfile`](Caddyfile) to `/etc/caddy/Caddyfile`
|
||||
(the comments in it list the checks), `caddy validate`, then
|
||||
`systemctl reload caddy`. Caddy gets the certificate the same way it
|
||||
does for the buildfor.life apex.
|
||||
`systemctl reload caddy`. Caddy gets its own certificates over
|
||||
HTTP-01/TLS-ALPN (ports 80 and 443 are open on s1).
|
||||
3. Web root: the deploy user must be able to create and rename
|
||||
directories in `/var/www`, as it already does for the blog. If not:
|
||||
`sudo install -d -o <deploy user> /var/www/cnxvinyl.lol /var/www/cnxvinyl.lol-prev`
|
||||
@@ -56,9 +54,8 @@ go into `public/` instead.
|
||||
4. Secrets in Gitea (repo: Settings > Actions > Secrets, or user level so
|
||||
every repo of the account gets them): `VPS_HOST`, `VPS_USER`,
|
||||
`VPS_SSH_KEY`, optionally `VPS_PORT` (default 22), `VPS_KNOWN_HOSTS`
|
||||
(output of `ssh-keyscan -p <port> s1.buildfor.life`, pins the host key),
|
||||
`CLOUDFLARE_ZONE_ID` and `CLOUDFLARE_API_TOKEN` (Zone > Cache Purge on
|
||||
cnxvinyl.lol). The names match the blog's workflow, so the blog's
|
||||
(output of `ssh-keyscan -p <port> s1.buildfor.life`, pins the host key).
|
||||
The names match the blog's workflow, so the blog's
|
||||
deploy key and values work unchanged: s1 only checks the key against
|
||||
the deploy user's `authorized_keys`, whichever repository sends it.
|
||||
Gitea secrets cannot be read back, so they are entered again here from
|
||||
|
||||
Reference in new issue
Block a user