Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69489e7e42 | ||
|
|
100002baa2 | ||
|
|
1943482d74 | ||
|
|
dc29f02caa | ||
|
|
07c632c1ee | ||
|
|
19873965cd |
No files matched your search
@@ -162,6 +162,33 @@ On a new host:
|
||||
Rauthy's mail leaves through kasse's postfix like gdo's, and Rauthy
|
||||
stops if it cannot reach it.
|
||||
|
||||
## Previews
|
||||
|
||||
Every content branch pushed to tomtervel/questions gets its own preview
|
||||
before it is merged, on `https://<branch>.forhandsvisning.tomtervel.no`,
|
||||
for five days after its last push; `forhandsvisning.tomtervel.no` lists
|
||||
the ones there are. The content repo runs them
|
||||
(`.gitea/preview/preview.sh`, from `lint-and-reload` once the lint
|
||||
passes): a container `tomtervel-preview-<branch>` from this site's own
|
||||
image (`localhost/tomtervel-portal:<PORTAL_RELEASE>`), beside a throwaway
|
||||
NATS (`tomtervel-preview-nats`) where each branch has a `SITE_NAME` of its
|
||||
own, and a small Caddy, `tomtervel-preview-router` on 127.0.0.1:3066, that
|
||||
picks the container by the name asked for. At most five run at once; the
|
||||
one that expires first goes when a sixth arrives. The content repo's
|
||||
`preview-cleanup` workflow removes them when they expire (hourly) and when
|
||||
their branch is deleted.
|
||||
|
||||
A preview has no gdo, so nothing mails anyone, and no sign-in, so desks
|
||||
stay shut and the public pages show. A form sent on it lands in the
|
||||
throwaway NATS and nowhere else. The commit gets a "forhåndsvisning"
|
||||
status with the link, which a PR shows among its checks. Main is never
|
||||
previewed: it is the site.
|
||||
|
||||
On kasse this needs the DNS records in `dns/dnsconfig.js` (the bare name
|
||||
and `*.forhandsvisning`), the two blocks in `host-caddy/tomtervel.no`, and
|
||||
the `on_demand_tls` global option described there, in
|
||||
`/etc/caddy/Caddyfile`.
|
||||
|
||||
## Backups
|
||||
|
||||
- Rauthy's database is the `rauthy_data` volume: the accounts, passkeys
|
||||
|
||||
@@ -87,6 +87,9 @@ services:
|
||||
context: ./portal
|
||||
args:
|
||||
PORTAL_RELEASE: ${PORTAL_RELEASE}
|
||||
# Named, so the content repo's preview (tomtervel/questions,
|
||||
# lint-and-reload.yml) runs the very image this site runs.
|
||||
image: localhost/tomtervel-portal:${PORTAL_RELEASE}
|
||||
restart: unless-stopped
|
||||
# Written by the deploy workflow from the Actions variables and
|
||||
# secrets (README.md has the table).
|
||||
|
||||
@@ -36,6 +36,12 @@ D("tomtervel.no", REG_NONE, DnsProvider(DSP_CLOUDFLARE),
|
||||
// id on to konto (the login) and chat on to samtaler.
|
||||
A("id", KASSE, CF_PROXY_OFF),
|
||||
A("chat", KASSE, CF_PROXY_OFF),
|
||||
// The content repo's previews: the list of them, and one name per
|
||||
// branch before it is merged (<branch>.forhandsvisning). Caddy gets a
|
||||
// certificate for a branch's name the first time it is asked for, and
|
||||
// only for a branch that has a preview (host-caddy/tomtervel.no).
|
||||
A("forhandsvisning", KASSE, CF_PROXY_OFF),
|
||||
A("*.forhandsvisning", KASSE, CF_PROXY_OFF),
|
||||
|
||||
// The old website, kept for now so the move can be undone: what the
|
||||
// apex and web. pointed at before (Netlify, through Cloudflare). The
|
||||
|
||||
@@ -32,3 +32,36 @@ chat.tomtervel.no {
|
||||
konto.tomtervel.no {
|
||||
reverse_proxy 127.0.0.1:8090
|
||||
}
|
||||
|
||||
# The content repo's previews (tomtervel/questions, .gitea/preview/): one
|
||||
# portal per branch on <branch>.forhandsvisning.tomtervel.no, for five days
|
||||
# after its last push, and the list of them on the bare name. Every name
|
||||
# goes to the previews' own router on 3066, which picks the branch's
|
||||
# container by name. Kept out of search engines.
|
||||
#
|
||||
# A branch's name has no certificate until someone opens it: Caddy gets one
|
||||
# on demand, and first asks the router whether that name has a preview, so
|
||||
# made-up names cannot use up Let's Encrypt's limits. That needs this in the
|
||||
# global options of /etc/caddy/Caddyfile (kasse's, shared with the other
|
||||
# sites there; nothing else on kasse uses on-demand TLS):
|
||||
#
|
||||
# on_demand_tls {
|
||||
# ask http://127.0.0.1:3066/ask
|
||||
# }
|
||||
#
|
||||
# Port 3066: 3060 is gullberg.klingenbergbygg.no's, 3065 was the single
|
||||
# preview before, and podman's own published ports (3050, 3065, 3066, 3070,
|
||||
# 8090) do not show in `ss`, so a port is chosen against this directory's
|
||||
# upstreams as well.
|
||||
forhandsvisning.tomtervel.no {
|
||||
header X-Robots-Tag "noindex, nofollow"
|
||||
reverse_proxy 127.0.0.1:3066
|
||||
}
|
||||
|
||||
*.forhandsvisning.tomtervel.no {
|
||||
tls {
|
||||
on_demand
|
||||
}
|
||||
header X-Robots-Tag "noindex, nofollow"
|
||||
reverse_proxy 127.0.0.1:3066
|
||||
}
|
||||
Reference in new issue
Block a user