mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
91095ef96a
* fix(transit): lead arrive-by results with the latest arrival (#1479) MOTIS returns arrive-by itineraries ascending with the deadline-adjacent connection last, so the visible top of the list arrived ~2h before the requested time — misread as a timezone bug. Sort arrive-by results by endTime descending so the connection closest to the requested arrival leads, mirroring depart-by. Claude-Session: https://claude.ai/code/session_01BCrZUoPzHZF6H4C6avMXoz * fix(transit): lead arrive-by results with the latest arrival (#1479) MOTIS returns arrive-by itineraries ascending with the deadline-adjacent connection last, so the visible top of the list arrived ~2h before the requested time — misread as a timezone bug. Sort arrive-by results by endTime descending so the connection closest to the requested arrival leads, mirroring depart-by. * fix(reservations): run AirTrail modal hooks before the isOpen early return (#1602) The sectionItems useMemo added by #1535 sat below 'if (!isOpen) return null'. The modal mounts closed, so the first open render executed one more hook than the previous render and React unmounted the whole tree (error #310), blanking the page. Move the memo above the early return and cover the closed-then-open transition with a regression test. * fix(planner): only draw the check-in-day hotel morning leg when provably at/after check-in (#1597) (#1607) On an accommodation's check-in day the hotel -> first-stop leg was drawn by default for any PLACE first stop, suppressed only when that place was explicitly timed before check-in. An un-timed first place (e.g. "Home" on day 1 of a driving holiday) therefore always produced a phantom hotel -> Home leg, regardless of the check-in time. Flip the default to mirror shouldDrawEveningLeg: the morning leg is now drawn only when the first place is provably timed at/after check-in (you dropped your bags first). The drawn map route, the sidebar hotel connectors, and the Google Maps export all share this helper and inherit the fix. The optimizer anchors (#1321) are unchanged. * fix(notifications): never fall back to the admin ntfy topic for per-user sends (#1608) * chore: correct shields.io url * chore: correct shields.io url * chore: update helm repo link * chore: document new helm chart url * chore: document new helm chart url * fix(atlas): make Kosovo selectable on the Atlas map (#1609) Kosovo's user-assigned ISO code (XK/XKX) was missing from both code tables in the atlas pipeline: the geo builder's A3_TO_A2 map (so the shipped admin0 bundle carried ISO_A2: null) and the client's A2_TO_A3 map. With neither resolvable, onEachFeature attached no hover/click handlers to Kosovo's polygon and the country search dropped it, making Kosovo impossible to select. - add XK<->XKX to the client A2_TO_A3 table and the builder A3_TO_A2 map - stamp ISO_A2: "XK" on the Kosovo feature in the shipped admin0 bundle - guard both with tests (atlasModel resolution + ATLAS-BUNDLE-003) * chore: normalize docker image references to mauriceboe/trek (lowercase) * fix(memories): honor Synology skip-SSL on photo streaming (#1611) The synology_skip_ssl setting was forwarded on the JSON API path (login/browse/test-connection) but not on the image-byte fetches, so a NAS with a self-signed certificate passed Test Connection while /api/photos/:id/thumbnail and /original failed with 500 "Failed to fetch asset" — and the TLS error was silently swallowed. - pipeAsset: accept fetchOptions and forward to safeFetch; log the underlying error on the 500 path (without the URL, which carries _sid) - fetchSynologyThumbnailBytes / streamSynologyAsset: pass rejectUnauthorized derived from synology_skip_ssl; log on failure - i18n: replace hardcoded "Immich" with {provider_name} in 7 memories keys across 14 locales (source of the reported "Failed to connect to Immich" banner on the Synology test), fix translated placeholder names in tr/ca/pl, and add a placeholder-parity spec to prevent regressions - client: gallery provider badge matched 'synology' instead of the real id 'synologyphotos', showing the raw id; label is now "Synology Photos" * chore: make chart.liketrek.com the canonical helm chart url * feat(plugins): prefer the registry's resolved store screenshot (#1613) Browse/detail use the screenshotUrl the aggregate step resolves (cover at the latest commit, or the first resolving README image), falling back to the docs/screenshot.png guess when the field is absent. Fixes blank store cards for plugins without a committed docs/screenshot.png. --------- Co-authored-by: Maurice <61554723+mauriceboe@users.noreply.github.com>
209 lines
7.7 KiB
Markdown
209 lines
7.7 KiB
Markdown
# Install: Helm
|
|
|
|
Deploy TREK on Kubernetes using the official Helm chart.
|
|
|
|
## Add the Chart Repository
|
|
|
|
```bash
|
|
helm repo add trek https://chart.liketrek.com
|
|
helm repo update
|
|
```
|
|
|
|
> **Note:** `chart.liketrek.com` is a custom domain (CNAME) for the GitHub Pages site at `https://liketrek.github.io/TREK` — both serve the same chart repository. Using the custom domain keeps your setup working even if the GitHub repository moves again.
|
|
|
|
> **⚠️ Repository moved:** The chart is no longer served at `https://mauriceboe.github.io/TREK` (the project moved from a personal repo to the `liketrek` organization). If you added the repo from the old URL, switch to the new one:
|
|
>
|
|
> ```bash
|
|
> helm repo remove trek
|
|
> helm repo add trek https://chart.liketrek.com
|
|
> helm repo update
|
|
> ```
|
|
>
|
|
> Existing releases keep working — only the repo URL changes; future `helm repo update` / `helm upgrade` runs require the new URL. (`https://liketrek.github.io/TREK` also works — it redirects to `chart.liketrek.com`.)
|
|
|
|
## Basic Install
|
|
|
|
```bash
|
|
helm install trek trek/trek
|
|
```
|
|
|
|
This deploys TREK with default values: a `ClusterIP` service on port 3000, 1 Gi PVCs for data and uploads, and no ingress.
|
|
|
|
## Encryption Key
|
|
|
|
`ENCRYPTION_KEY` encrypts stored secrets (API keys, MFA, SMTP, OIDC) at rest. There are three ways to handle it:
|
|
|
|
**Option 1 — Let the chart generate a random key (recommended for new installs):**
|
|
|
|
```bash
|
|
helm install trek trek/trek --set generateEncryptionKey=true
|
|
```
|
|
|
|
The chart generates a 32-character alphanumeric key at install time and preserves it across upgrades. Note that this differs from the 64-character hex key produced by `openssl rand -hex 32` — both formats are accepted by the server.
|
|
|
|
**Option 2 — Set an explicit key:**
|
|
|
|
```bash
|
|
helm install trek trek/trek \
|
|
--set secretEnv.ENCRYPTION_KEY=$(openssl rand -hex 32)
|
|
```
|
|
|
|
**Option 3 — Use an existing Kubernetes Secret:**
|
|
|
|
```bash
|
|
kubectl create secret generic trek-secrets \
|
|
--from-literal=ENCRYPTION_KEY=$(openssl rand -hex 32)
|
|
|
|
helm install trek trek/trek \
|
|
--set existingSecret=trek-secrets
|
|
```
|
|
|
|
If `existingSecret` uses a different key name than `ENCRYPTION_KEY`, specify it with `--set existingSecretKey=MY_KEY_NAME`.
|
|
|
|
> **Note:** If both `generateEncryptionKey` and `existingSecret` are set, `existingSecret` takes precedence. Only one method should be active at a time.
|
|
|
|
> **Note:** If `ENCRYPTION_KEY` is left empty, the server resolves it automatically: existing installs fall back to `data/.jwt_secret` (encrypted data stays readable after upgrade); fresh installs auto-generate a key persisted to the data PVC.
|
|
|
|
> **Note:** `JWT_SECRET` is managed entirely by the server — auto-generated on first start and persisted to the data PVC. It can be rotated via the admin panel (Settings → Danger Zone → Rotate JWT Secret). No Helm configuration is needed or supported for it.
|
|
|
|
## Admin Account
|
|
|
|
`ADMIN_EMAIL` and `ADMIN_PASSWORD` are set via `secretEnv`. They are only used on first boot when no users exist yet. **Both must be set together** — if either is missing, the server ignores both values and instead creates the admin account with email `admin@trek.local` and a random password, which is printed to the server log.
|
|
|
|
```bash
|
|
helm install trek trek/trek \
|
|
--set secretEnv.ADMIN_EMAIL=admin@example.com \
|
|
--set secretEnv.ADMIN_PASSWORD=<your-secure-password>
|
|
```
|
|
|
|
> **Note:** When `OIDC_ONLY=true` is configured together with `OIDC_ISSUER` and `OIDC_CLIENT_ID`, no local admin account is created on first boot. Instead, the first user to log in via SSO automatically becomes admin.
|
|
|
|
## Key `values.yaml` Settings
|
|
|
|
### Image
|
|
|
|
```yaml
|
|
image:
|
|
repository: mauriceboe/trek
|
|
# tag: latest # defaults to the chart's appVersion
|
|
pullPolicy: IfNotPresent
|
|
|
|
# Optional: pull secrets for private registries
|
|
imagePullSecrets: []
|
|
# - name: my-registry-secret
|
|
```
|
|
|
|
### Service
|
|
|
|
```yaml
|
|
service:
|
|
type: ClusterIP # change to LoadBalancer or NodePort to expose externally
|
|
port: 3000
|
|
```
|
|
|
|
### Plain Environment Variables (`env`)
|
|
|
|
```yaml
|
|
env:
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
# TZ: "Europe/Berlin" # timezone for logs, reminders, cron jobs
|
|
# LOG_LEVEL: "info" # "info" = concise, "debug" = verbose
|
|
# TREK_WIKI_DIR: "/app/wiki" # where /help reads its docs from; leave unset (the image ships them)
|
|
# DEFAULT_LANGUAGE: "en" # fallback language on login page; supported: de, en, es, fr, hu, nl, br, cs, pl, ru, zh, zh-TW, it, tr, ar, id, ja, ko, uk, gr
|
|
# ALLOWED_ORIGINS: "https://trek.example.com"
|
|
# APP_URL: "https://trek.example.com"
|
|
# FORCE_HTTPS: "false" # enable HTTPS redirect + HSTS; requires TRUST_PROXY
|
|
# TRUST_PROXY: "1" # proxy hops for X-Forwarded-For/Proto; defaults to 1 in production
|
|
# COOKIE_SECURE: "true" # auto-derived; set "false" only for local HTTP testing
|
|
# ALLOW_INTERNAL_NETWORK: "false" # set "true" if Immich or other services are on a private network
|
|
# DEMO_MODE: "false" # enable demo mode (hourly data resets)
|
|
# MCP_RATE_LIMIT: "300" # max MCP requests per user per minute
|
|
# OIDC_ISSUER: "https://auth.example.com"
|
|
# OIDC_CLIENT_ID: "trek"
|
|
# OIDC_DISPLAY_NAME: "SSO"
|
|
# OIDC_ONLY: "false" # force SSO-only mode; disables password login
|
|
# OIDC_ADMIN_CLAIM: "" # OIDC claim used to identify admin users
|
|
# OIDC_ADMIN_VALUE: "" # value of that claim that grants admin role
|
|
# OIDC_SCOPE: "openid email profile groups"
|
|
# OIDC_DISCOVERY_URL: "" # override for providers with non-standard discovery paths (e.g. Authentik)
|
|
```
|
|
|
|
### Sensitive Variables (`secretEnv`)
|
|
|
|
These are stored in a Kubernetes Secret and injected as environment variables:
|
|
|
|
```yaml
|
|
secretEnv:
|
|
ENCRYPTION_KEY: "" # recommended: openssl rand -hex 32
|
|
ADMIN_EMAIL: "" # initial admin email (first boot only)
|
|
ADMIN_PASSWORD: "" # initial admin password (first boot only)
|
|
OIDC_CLIENT_SECRET: "" # set if using OIDC
|
|
```
|
|
|
|
Alternatively, use `generateEncryptionKey: true` to let the chart generate and manage the encryption key, or point `existingSecret` / `existingSecretKey` at an existing Kubernetes Secret.
|
|
|
|
### Persistent Storage
|
|
|
|
```yaml
|
|
persistence:
|
|
enabled: true
|
|
data:
|
|
size: 1Gi # SQLite database, logs, secrets
|
|
uploads:
|
|
size: 1Gi # uploaded files — increase if you expect large media uploads
|
|
```
|
|
|
|
### Resource Limits
|
|
|
|
```yaml
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
```
|
|
|
|
### Ingress
|
|
|
|
```yaml
|
|
ingress:
|
|
enabled: true
|
|
className: "nginx" # your ingress class
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "86400" # required for WebSockets
|
|
nginx.ingress.kubernetes.io/proxy-body-size: "500m" # required for backup restore
|
|
hosts:
|
|
- host: trek.example.com
|
|
paths:
|
|
- /
|
|
tls:
|
|
- secretName: trek-tls
|
|
hosts:
|
|
- trek.example.com
|
|
```
|
|
|
|
> **Important:** TREK uses WebSockets on `/ws`. Your ingress controller must support WebSocket upgrades. Set `proxy-read-timeout` to at least `86400` and `proxy-body-size` to at least `500m` for backup restores.
|
|
|
|
> **Note:** Keep `env.ALLOWED_ORIGINS` in sync with `ingress.hosts` — the chart does not synchronize these automatically.
|
|
|
|
> **Note:** When using ingress with TLS termination, set `env.FORCE_HTTPS: "true"` and `env.TRUST_PROXY: "1"` to enable HTTPS redirects, HSTS, and secure cookies.
|
|
|
|
## Upgrade
|
|
|
|
```bash
|
|
helm repo update
|
|
helm upgrade trek trek/trek
|
|
```
|
|
|
|
## Full Values Reference
|
|
|
|
See the [`charts/README.md`](https://github.com/liketrek/TREK/blob/main/charts/README.md) for all available values.
|
|
|
|
## Next Steps
|
|
|
|
- [Environment-Variables](Environment-Variables) — full variable reference
|
|
- [Reverse-Proxy](Reverse-Proxy) — proxy configuration for non-Kubernetes deployments
|