mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
6c87bf2f7a
The /help pages fetched their markdown from raw.githubusercontent.com at
runtime, so a self-hosted install was served docs from main rather than the
version it was actually running, and help was unusable without network access.
The wiki/ directory was in the repo the whole time; the bundled-snapshot
fallback the code reached for was gitignored and never populated by any build
step, so it was dead code.
Read wiki/ straight from disk instead. server/{src,dist}/services both sit
three levels under the repo root, so a single __dirname anchor resolves in dev,
a built source install, vitest and Docker with no copy or build step. GitHub is
kept strictly as a fallback for when the directory cannot be resolved, decided
once at load by probing for _Sidebar.md: a page missing from a present wiki is
a genuine 404, since falling back per-file would reintroduce the version skew
this removes.
Ship wiki/ in the image: .dockerignore excluded it outright, so the COPY alone
would have produced an image with no wiki, and the GitHub fallback would have
masked that at runtime. Add a real path-containment check on assets now that
the path becomes a filesystem read rather than a URL, and document
TREK_WIKI_DIR as an off-by-default escape hatch across the deployment configs.
82 lines
2.8 KiB
YAML
82 lines
2.8 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "trek.fullname" . }}-config
|
|
labels:
|
|
app: {{ include "trek.name" . }}
|
|
data:
|
|
NODE_ENV: {{ .Values.env.NODE_ENV | quote }}
|
|
PORT: {{ .Values.env.PORT | quote }}
|
|
{{- if .Values.env.TZ }}
|
|
TZ: {{ .Values.env.TZ | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.LOG_LEVEL }}
|
|
LOG_LEVEL: {{ .Values.env.LOG_LEVEL | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.TREK_WIKI_DIR }}
|
|
TREK_WIKI_DIR: {{ .Values.env.TREK_WIKI_DIR | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.ALLOWED_ORIGINS }}
|
|
ALLOWED_ORIGINS: {{ .Values.env.ALLOWED_ORIGINS | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.APP_URL }}
|
|
APP_URL: {{ .Values.env.APP_URL | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.FORCE_HTTPS }}
|
|
FORCE_HTTPS: {{ .Values.env.FORCE_HTTPS | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.HSTS_INCLUDE_SUBDOMAINS }}
|
|
HSTS_INCLUDE_SUBDOMAINS: {{ .Values.env.HSTS_INCLUDE_SUBDOMAINS | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.COOKIE_SECURE }}
|
|
COOKIE_SECURE: {{ .Values.env.COOKIE_SECURE | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.SESSION_DURATION }}
|
|
SESSION_DURATION: {{ .Values.env.SESSION_DURATION | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.SESSION_DURATION_REMEMBER }}
|
|
SESSION_DURATION_REMEMBER: {{ .Values.env.SESSION_DURATION_REMEMBER | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.TRUST_PROXY }}
|
|
TRUST_PROXY: {{ .Values.env.TRUST_PROXY | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.ALLOW_INTERNAL_NETWORK }}
|
|
ALLOW_INTERNAL_NETWORK: {{ .Values.env.ALLOW_INTERNAL_NETWORK | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_ISSUER }}
|
|
OIDC_ISSUER: {{ .Values.env.OIDC_ISSUER | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_CLIENT_ID }}
|
|
OIDC_CLIENT_ID: {{ .Values.env.OIDC_CLIENT_ID | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_DISPLAY_NAME }}
|
|
OIDC_DISPLAY_NAME: {{ .Values.env.OIDC_DISPLAY_NAME | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_ONLY }}
|
|
OIDC_ONLY: {{ .Values.env.OIDC_ONLY | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_ADMIN_CLAIM }}
|
|
OIDC_ADMIN_CLAIM: {{ .Values.env.OIDC_ADMIN_CLAIM | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_ADMIN_VALUE }}
|
|
OIDC_ADMIN_VALUE: {{ .Values.env.OIDC_ADMIN_VALUE | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_SCOPE }}
|
|
OIDC_SCOPE: {{ .Values.env.OIDC_SCOPE | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OIDC_DISCOVERY_URL }}
|
|
OIDC_DISCOVERY_URL: {{ .Values.env.OIDC_DISCOVERY_URL | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.DEMO_MODE }}
|
|
DEMO_MODE: {{ .Values.env.DEMO_MODE | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.MCP_RATE_LIMIT }}
|
|
MCP_RATE_LIMIT: {{ .Values.env.MCP_RATE_LIMIT | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OVERPASS_URL }}
|
|
OVERPASS_URL: {{ .Values.env.OVERPASS_URL | quote }}
|
|
{{- end }}
|
|
{{- if .Values.env.OVERPASS_TIMEOUT_MS }}
|
|
OVERPASS_TIMEOUT_MS: {{ .Values.env.OVERPASS_TIMEOUT_MS | quote }}
|
|
{{- end }}
|