ops/dossiers-ngi: edition tree bar, 10min tip-skip rebuild, cleanup
This commit is contained in:
parent
e35205b6cd
commit
737d37a76d
22 changed files with 1458 additions and 173 deletions
|
|
@ -1,19 +1,44 @@
|
|||
# Stanza body for dossiers.ngi.hacktivism.ch only (hand-check / re-seed).
|
||||
# Templates apply is host-local on koopa (not in this repo):
|
||||
# bash ~/bin/apply-dossiers-ngi-templates.sh
|
||||
# Apply on koopa (host-local):
|
||||
# bash ~/bin/apply-dossiers-ngi-edition-switch.sh
|
||||
# sudo ~/bin/caddy-apply
|
||||
#
|
||||
# Keep the existing line: header Alt-Svc "clear"
|
||||
# Keep any existing basic_auth in that same block.
|
||||
# scripts/caddy/caddy-apply.sh --snippet reports an existing block and
|
||||
# does not merge these lines. Leave that script unused for this change.
|
||||
# Leave scripts/caddy/apply-goa-wdGet-full-replace.sh unused.
|
||||
# Leave scripts/caddy/apply-dossiers-ngi-basicauth.sh unused.
|
||||
# Stock Caddy templates only. No replace-response plugin.
|
||||
# Sticky bar switches build via cookie tdpd_edition → editions/<name>/.
|
||||
# Stock Caddy only (templates + map + handle). No replace-response plugin.
|
||||
# Keep .2 / .3 blocks untouched.
|
||||
#
|
||||
# Tab-indented lines inserted after header Alt-Svc:
|
||||
# Site-block body (no outer braces):
|
||||
|
||||
header Alt-Svc "clear"
|
||||
|
||||
@use path_regexp use ^/_cascade/use/([A-Za-z0-9_-]+)/?$
|
||||
handle @use {
|
||||
header Set-Cookie "tdpd_edition={re.use.1}; Path=/; Max-Age=31536000; SameSite=Lax"
|
||||
redir * / 302
|
||||
}
|
||||
|
||||
handle /_cascade/* {
|
||||
root * /var/www/monitoring-sites/dossiers.ngi.hacktivism.ch
|
||||
file_server
|
||||
}
|
||||
handle /branch-status.json {
|
||||
root * /var/www/monitoring-sites/dossiers.ngi.hacktivism.ch
|
||||
file_server
|
||||
}
|
||||
|
||||
# Dynamic editions: cookie value is the dir name under editions/
|
||||
# (hourly builder stages every origin/* tip as slug with / → -).
|
||||
map {http.request.cookie.tdpd_edition} {edition_dir} {
|
||||
default flask
|
||||
flask flask
|
||||
~^[A-Za-z0-9_-]+$ {http.request.cookie.tdpd_edition}
|
||||
}
|
||||
|
||||
root * /var/www/monitoring-sites/dossiers.ngi.hacktivism.ch/editions/{edition_dir}
|
||||
templates {
|
||||
mime text/html
|
||||
between "{%" "%}"
|
||||
root /var/www/monitoring-sites/dossiers.ngi.hacktivism.ch
|
||||
}
|
||||
file_server
|
||||
try_files {path} {path}/ {path}/index.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue