Files
stack/infra/traefik/dynamic/services.yml
kert 1cbecb110f
All checks were successful
CI / lint (push) Successful in 37s
CI / notebooks-smoke (push) Successful in 1m30s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / llm (push) Has been skipped
Deploy / mc (push) Has been skipped
Infra CI / notebooks (push) Successful in 47s
Infra CI / zotero (push) Successful in 13s
Infra CI / docs (push) Successful in 16s
Infra CI / api (push) Successful in 1m3s
Infra CI / llm (push) Successful in 48s
Infra CI / mc (push) Successful in 12s
Deploy / report (push) Successful in 16s
CI / test (push) Successful in 14m45s
Harden / build-scan-report (push) Successful in 27m32s
Notebooks Integration / notebooks-integration (push) Successful in 8m1s
Zotero Sync / zotero-sync (push) Successful in 58s
Package Supply Chain / pkg-supply-chain (push) Successful in 59s
fix(llm): stop CSS-injection clash on chat UI; style natively in HTI-5 palette
theme:true injected the generic fhirworx.css (light editorial, !important
rules) over the chat page's own dark theme, wrecking the colors. Set
theme:false and restyle the page natively in the platform palette
(cream/navy, Playfair/Source Serif), with cited [ID] tokens as mono chips.
2026-07-17 21:47:19 -04:00

161 lines
5.9 KiB
YAML

{{- $domain := env "DOMAIN" | default "fhirworx.io" -}}
{{- $reef := dict
"dashboard" (dict "port" "80" "theme" true "extra_hosts" (list $domain) "mw" "secure-headers")
"docs" (dict "port" "80" "theme" false "mw" "git-sso,secure-headers")
"git" (dict "port" "3000" "theme" false "mw" "secure-headers")
"notebooks" (dict "port" "2718" "theme" true "mw" "git-sso,secure-headers")
"zotero" (dict "port" "8080" "theme" true "mw" "git-sso,secure-headers")
"webdav" (dict "port" "8080" "theme" false "mw" "secure-headers")
"api" (dict "port" "8000" "theme" false "mw" "secure-headers")
"llm" (dict "port" "8000" "theme" false "mw" "git-sso,secure-headers")
"nessie" (dict "port" "19120" "theme" false "mw" "git-sso,infra-headers")
"trino" (dict "port" "8080" "theme" true "mw" "git-sso,infra-headers")
"polaris" (dict "port" "8181" "theme" false "mw" "git-sso,infra-headers")
"grafana" (dict "port" "3000" "theme" true "mw" "git-sso,secure-headers")
"prometheus" (dict "port" "9090" "theme" true "mw" "git-sso,infra-headers")
"tempo" (dict "port" "3200" "theme" true "mw" "git-sso,infra-headers")
"loki" (dict "port" "3100" "theme" false "mw" "git-sso,infra-headers")
-}}
{{- $multi := dict
"rustfs-api" (dict "container" "rustfs" "port" "9000" "subdomain" "s3" "theme" false "mw" "git-sso,infra-headers")
"rustfs-console" (dict "container" "rustfs" "port" "9001" "subdomain" "s3console" "theme" true "mw" "git-sso,infra-headers")
-}}
http:
middlewares:
secure-headers:
headers:
frameDeny: true
browserXssFilter: true
contentTypeNosniff: true
# SSO: auth-handler (nginx) wraps oauth2-proxy to convert 401 → 302.
# Same logic as corwins.media: auth_request + error_page 401 = @signin.
git-sso:
forwardAuth:
address: "http://auth-handler:4181"
trustForwardHeader: true
authResponseHeaders:
- "X-Auth-Request-User"
- "X-Auth-Request-Email"
infra-headers:
headers:
frameDeny: true
browserXssFilter: true
contentTypeNosniff: true
referrerPolicy: "strict-origin-when-cross-origin"
customResponseHeaders:
X-Robots-Tag: "noindex, nofollow"
inject-fhirworx:
plugin:
rewrite-body:
lastModified: true
rewrites:
- regex: "</head>"
replacement: '<link rel="icon" type="image/png" sizes="32x32" href="//dashboard.{{ $domain }}/fav32.png"><link rel="stylesheet" type="text/css" href="//dashboard.{{ $domain }}/fhirworx.css"></head>'
routers:
# auth.DOMAIN — oauth2-proxy public endpoints (login, callback, sign_out)
auth-host:
rule: "Host(`auth.{{ $domain }}`)"
service: oauth2-proxy
entryPoints:
- web
auth-host-tls:
rule: "Host(`auth.{{ $domain }}`)"
service: oauth2-proxy
entryPoints:
- websecure
tls: {}
{{- range $name, $svc := $reef }}
{{ $name }}:
rule: "Host(`{{ get $svc "subdomain" | default $name }}.{{ $domain }}`){{ range get $svc "extra_hosts" | default list }} || Host(`{{ . }}`){{ end }}"
service: {{ $name }}
entryPoints:
- web
{{- $mwList := list -}}
{{- if get $svc "theme" }}{{ $mwList = append $mwList "inject-fhirworx" }}{{ end -}}
{{- $extra := get $svc "mw" | default "" -}}
{{- if ne $extra "" }}{{ range splitList "," $extra }}{{ $mwList = append $mwList (trim .) }}{{ end }}{{ end -}}
{{- if $mwList }}
middlewares:
{{- range $mwList }}
- {{ . }}
{{- end }}
{{- end }}
{{ $name }}-tls:
rule: "Host(`{{ get $svc "subdomain" | default $name }}.{{ $domain }}`){{ range get $svc "extra_hosts" | default list }} || Host(`{{ . }}`){{ end }}"
service: {{ $name }}
entryPoints:
- websecure
tls: {}
{{- if $mwList }}
middlewares:
{{- range $mwList }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- range $name, $svc := $multi }}
{{ $name }}:
rule: "Host(`{{ get $svc "subdomain" }}.{{ $domain }}`)"
service: {{ $name }}
entryPoints:
- web
{{- $mwList := list -}}
{{- if get $svc "theme" }}{{ $mwList = append $mwList "inject-fhirworx" }}{{ end -}}
{{- $extra := get $svc "mw" | default "" -}}
{{- if ne $extra "" }}{{ range splitList "," $extra }}{{ $mwList = append $mwList (trim .) }}{{ end }}{{ end -}}
{{- if $mwList }}
middlewares:
{{- range $mwList }}
- {{ . }}
{{- end }}
{{- end }}
{{ $name }}-tls:
rule: "Host(`{{ get $svc "subdomain" }}.{{ $domain }}`)"
service: {{ $name }}
entryPoints:
- websecure
tls: {}
{{- if $mwList }}
middlewares:
{{- range $mwList }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
traefik-dashboard:
rule: "Host(`traefik.{{ $domain }}`)"
service: api@internal
entryPoints:
- web
middlewares:
- inject-fhirworx
- git-sso
- infra-headers
traefik-dashboard-tls:
rule: "Host(`traefik.{{ $domain }}`)"
service: api@internal
entryPoints:
- websecure
tls: {}
middlewares:
- inject-fhirworx
- git-sso
- infra-headers
services:
{{- range $name, $svc := $reef }}
{{ $name }}:
loadBalancer:
servers:
- url: "http://{{ $name }}:{{ get $svc "port" }}"
{{- end }}
{{- range $name, $svc := $multi }}
{{ $name }}:
loadBalancer:
servers:
- url: "http://{{ get $svc "container" }}:{{ get $svc "port" }}"
{{- end }}
oauth2-proxy:
loadBalancer:
servers:
- url: "http://oauth2-proxy:4180"