diff --git a/README.md b/README.md index d393edd..7c58345 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,19 @@ On a new host: Rauthy's mail leaves through kasse's postfix like gdo's, and Rauthy stops if it cannot reach it. +## Preview + +`forhandsvisning.tomtervel.no` shows the content branch last pushed to +tomtervel/questions, before it is merged. The content repo's +`lint-and-reload` workflow runs it after the lint passes: a container +`tomtervel-preview` from this site's own image +(`localhost/tomtervel-portal:`), beside a throwaway NATS +(`tomtervel-preview-nats`), on 127.0.0.1:3060. It 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. + ## Backups - Rauthy's database is the `rauthy_data` volume: the accounts, passkeys diff --git a/compose.yml b/compose.yml index 57381f6..fe7fce9 100644 --- a/compose.yml +++ b/compose.yml @@ -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). diff --git a/dns/dnsconfig.js b/dns/dnsconfig.js index cff7cce..90d7b4d 100644 --- a/dns/dnsconfig.js +++ b/dns/dnsconfig.js @@ -36,6 +36,8 @@ 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 preview: a branch before it is merged. + 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 diff --git a/host-caddy/tomtervel.no b/host-caddy/tomtervel.no index 8b7a696..27306f7 100644 --- a/host-caddy/tomtervel.no +++ b/host-caddy/tomtervel.no @@ -32,3 +32,11 @@ chat.tomtervel.no { konto.tomtervel.no { reverse_proxy 127.0.0.1:8090 } + +# The content repo's preview: the branch last pushed, on a portal of its +# own with a throwaway NATS, no mail and no sign-in (tomtervel/questions, +# lint-and-reload.yml). Kept out of search engines. +forhandsvisning.tomtervel.no { + header X-Robots-Tag "noindex, nofollow" + reverse_proxy 127.0.0.1:3060 +}