From 37fb8d2d68044f1d90513125be54059f1812942d Mon Sep 17 00:00:00 2001 From: kert Date: Thu, 12 Nov 2026 17:56:03 -0500 Subject: [PATCH] feat(dossier): lex. is the dossier app's address, with a banner that explains the name (S0b, R79) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bootstrap_sso.py: "lex" joins SUBDOMAINS; --dns-only added the tunnel ingress entry (25 hostnames, all 24 existing kept) and a proxied CNAME. Traefik: lex./ is rewritten (replacePath) to the static page Gitea serves, /assets/dossier/ passes through, and a priority-10 catch-all redirects every other lex path to "/" via noop@internal, so Gitea's own pages never appear on lex. git-sso is first on every lex chain. The old git./dossier now 302s to lex before SSO, so sign-in lands on lex; the unused dossier-page rewrite is gone and the git-host /assets/dossier/ routers stay behind SSO. Page: title "lex · Home or Residence Services"; the navbar reads "fhirworx | lex" with links back to git.; the banner says what lex is (Latin for law; a legal-epidemiology workbench) and keeps the build status as a smaller second line. --- dev/scripts/bootstrap_sso.py | 1 + dev/scripts/dossier_page/build.py | 19 +++-- dev/scripts/dossier_page/template.html | 28 ++++--- infra/traefik/dynamic/services.yml | 103 +++++++++++++++++++++---- 4 files changed, 117 insertions(+), 34 deletions(-) diff --git a/dev/scripts/bootstrap_sso.py b/dev/scripts/bootstrap_sso.py index f14fc50..6ccc7ea 100644 --- a/dev/scripts/bootstrap_sso.py +++ b/dev/scripts/bootstrap_sso.py @@ -278,6 +278,7 @@ SUBDOMAINS = [ "bcda", # BCDA manager (P52) — Streamlit behind git-sso "lead", # LEAD public-data explorer — Streamlit behind git-sso "reach", # same public-data explorer, at reach.fhirworx.io + "lex", # legal-epidemiology workbench (code-family dossiers) — static page via Gitea custom/public behind git-sso ] diff --git a/dev/scripts/dossier_page/build.py b/dev/scripts/dossier_page/build.py index 6e3538d..4b630df 100644 --- a/dev/scripts/dossier_page/build.py +++ b/dev/scripts/dossier_page/build.py @@ -1,8 +1,10 @@ -"""Build the HOME-VISITS dossier page: a static snapshot with its data inlined. +"""Build the lex dossier page (HOME-VISITS): a static snapshot, data inlined. -Served by Gitea from its bind-mounted custom directory at -``git./dossier`` (Traefik router ``dossier``, behind ``git-sso``; -see infra/traefik/dynamic/services.yml). Run from the primary checkout, +lex (Latin for law) is the legal-epidemiology workbench. The page is served +by Gitea from its bind-mounted custom directory at ``lex./`` +(Traefik routers ``lex*``, behind ``git-sso``; the old address +``git./dossier`` redirects there; see +infra/traefik/dynamic/services.yml). Run from the primary checkout, never a worktree (the replica and bib.sqlite live in its data/): bash -c 'cd /home/kert/stack && set -a && . ./.env && set +a && \ @@ -52,6 +54,7 @@ from pfs.valuation import ( HERE = Path(__file__).resolve().parent ROOT = HERE.parents[2] +DOMAIN = os.environ.get("DOMAIN", "fhirworx.io") FAMILY = "HOME-VISITS" DOCKET = "CMS-2022-0113" @@ -794,10 +797,10 @@ if args.json: print(f"wrote {args.json} ({args.json.stat().st_size:,} bytes)", file=sys.stderr) -def _fill(tpl: str, marker: str, value: str) -> str: - if tpl.count(marker) != 1: +def _fill(tpl: str, marker: str, value: str, count: int = 1) -> str: + if tpl.count(marker) != count: raise SystemExit( - f"template.html: expected one {marker!r}, found {tpl.count(marker)}" + f"template.html: expected {count} {marker!r}, found {tpl.count(marker)}" ) return tpl.replace(marker, value) @@ -806,6 +809,8 @@ def _fill(tpl: str, marker: str, value: str) -> str: # string in it can close or confuse the