From 280fcecabb1381f272b0c297066da7205d447a35 Mon Sep 17 00:00:00 2001 From: jubnl Date: Wed, 15 Apr 2026 03:10:57 +0200 Subject: [PATCH] docs: document DEFAULT_LANGUAGE env var across all deployment configs Add DEFAULT_LANGUAGE to docker-compose.yml, README (compose example + env var table), Helm chart values.yaml, and unraid-template.xml. server/.env.example was already updated in the original PR. --- README.md | 2 ++ charts/trek/values.yaml | 4 ++++ docker-compose.yml | 1 + unraid-template.xml | 1 + 4 files changed, 8 insertions(+) diff --git a/README.md b/README.md index e25bd68d..8a41cb7c 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ services: - ENCRYPTION_KEY=${ENCRYPTION_KEY:-} # Recommended. Generate with: openssl rand -hex 32. If unset, falls back to data/.jwt_secret (existing installs) or auto-generates a key (fresh installs). - TZ=${TZ:-UTC} # Timezone for logs, reminders and scheduled tasks (e.g. Europe/Berlin) - LOG_LEVEL=${LOG_LEVEL:-info} # info = concise user actions; debug = verbose admin-level details + # - DEFAULT_LANGUAGE=en # Default language on the login page for users with no saved preference. Browser/OS language is auto-detected first; this is the fallback. Supported: de, en, es, fr, hu, nl, br, cs, pl, ru, zh, zh-TW, it, ar - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-} # Comma-separated origins for CORS and email notification links # - FORCE_HTTPS=true # Optional. Enables HTTPS redirect, HSTS, CSP upgrade-insecure-requests, and secure cookies behind a TLS proxy # - COOKIE_SECURE=false # Escape hatch: force session cookies over plain HTTP even in production. Not recommended. @@ -309,6 +310,7 @@ trek.yourdomain.com { | `ENCRYPTION_KEY` | At-rest encryption key for stored secrets (API keys, MFA, SMTP, OIDC). Recommended: generate with `openssl rand -hex 32`. If unset, falls back to `data/.jwt_secret` (existing installs) or auto-generates a key (fresh installs). | Auto | | `TZ` | Timezone for logs, reminders and cron jobs (e.g. `Europe/Berlin`) | `UTC` | | `LOG_LEVEL` | `info` = concise user actions, `debug` = verbose details | `info` | +| `DEFAULT_LANGUAGE` | Default language shown on the login page for users with no saved preference. Browser/OS language is auto-detected first; this is the fallback when no match is found. Supported values: `de`, `en`, `es`, `fr`, `hu`, `nl`, `br`, `cs`, `pl`, `ru`, `zh`, `zh-TW`, `it`, `ar` | `en` | | `ALLOWED_ORIGINS` | Comma-separated origins for CORS and email links | same-origin | | `FORCE_HTTPS` | Optional. When `true`: 301-redirects HTTP to HTTPS, sends HSTS (`max-age=31536000`), adds CSP `upgrade-insecure-requests`, and forces the session cookie `secure` flag. Only useful behind a TLS-terminating reverse proxy. Requires `TRUST_PROXY` to be set so Express can detect the forwarded protocol. | `false` | | `COOKIE_SECURE` | Controls the `secure` flag on the `trek_session` cookie. Auto-derived: secure is on when `NODE_ENV=production` **or** `FORCE_HTTPS=true`. Set to `false` as an escape hatch to allow session cookies over plain HTTP (e.g. LAN testing without TLS). **Not recommended to disable in production.** | auto (`true` in production) | diff --git a/charts/trek/values.yaml b/charts/trek/values.yaml index 05e459d6..42c86b1f 100644 --- a/charts/trek/values.yaml +++ b/charts/trek/values.yaml @@ -19,6 +19,10 @@ env: # Timezone for logs, reminders, and cron jobs (e.g. Europe/Berlin). # LOG_LEVEL: "info" # "info" = concise user actions, "debug" = verbose details. + # DEFAULT_LANGUAGE: "en" + # Default language on the login page for users with no saved preference. + # Browser/OS language is auto-detected first; this is the fallback when no match is found. + # Supported: de, en, es, fr, hu, nl, br, cs, pl, ru, zh, zh-TW, it, ar # ALLOWED_ORIGINS: "" # NOTE: If using ingress, ensure env.ALLOWED_ORIGINS matches the domains in ingress.hosts for proper CORS configuration. # APP_URL: "https://trek.example.com" diff --git a/docker-compose.yml b/docker-compose.yml index 946c133d..e0d84418 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,7 @@ services: - ENCRYPTION_KEY=${ENCRYPTION_KEY:-} # Recommended. Generate with: openssl rand -hex 32. If unset, falls back to data/.jwt_secret (existing installs) or auto-generates a key (fresh installs). - TZ=${TZ:-UTC} # Timezone for logs, reminders and scheduled tasks (e.g. Europe/Berlin) - LOG_LEVEL=${LOG_LEVEL:-info} # info = concise user actions; debug = verbose admin-level details +# - DEFAULT_LANGUAGE=en # Default language on the login page for users with no saved preference. Browser/OS language is auto-detected first; this is the fallback. Supported: de, en, es, fr, hu, nl, br, cs, pl, ru, zh, zh-TW, it, ar - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-} # Comma-separated origins for CORS and email notification links # - FORCE_HTTPS=true # Optional. Enables HTTPS redirect, HSTS, CSP upgrade-insecure-requests, and secure cookies behind a TLS proxy # - COOKIE_SECURE=false # Escape hatch: force session cookies over plain HTTP even in production. Not recommended. diff --git a/unraid-template.xml b/unraid-template.xml index fa3f2fc6..69ca38f6 100644 --- a/unraid-template.xml +++ b/unraid-template.xml @@ -33,6 +33,7 @@ production UTC info + en false