Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

20.1 KB
Raw Blame

image:
  repository: mauriceboe/trek
  # tag: latest
  pullPolicy: IfNotPresent

# Deployment update strategy. Keep Recreate. The new pod migrates the database when it
# starts, and during a RollingUpdate it would do that while the old pod still writes to
# it. Recreate stops the old pod first. On SQLite two processes on one travel.db are
# unsafe, and a ReadWriteOnce volume cannot be attached to both pods at once.
# With database.url the database is PostgreSQL, but the reason for one replica stays: TREK
# keeps rate limits, pending codes, the permission cache and WebSocket connections in
# memory, so a second pod would not share them. Postgres does not make more replicas safe.
updateStrategy: Recreate

# Pod-level security context. fsGroup gives the node user (uid/gid 1000) group access
# to the data and uploads volumes; OnRootMismatch lets the kubelet skip its recursive
# permission walk once the volume root already matches, so a big PVC does not hold up
# every start.
#
# By default the container starts as root, hands any files that are not node's yet to
# node, and then drops to node itself. To start it as node straight away (needed under
# the "restricted" Pod Security Standard), add the user here and lock the container
# down below; the image then skips the ownership step and the privilege drop:
#   podSecurityContext:
#     fsGroup: 1000
#     fsGroupChangePolicy: OnRootMismatch
#     runAsUser: 1000
#     runAsGroup: 1000
#     runAsNonRoot: true
#     seccompProfile:
#       type: RuntimeDefault
#   securityContext:
#     allowPrivilegeEscalation: false
#     capabilities:
#       drop: [ALL]
podSecurityContext:
  fsGroup: 1000
  fsGroupChangePolicy: OnRootMismatch

# Security context of the trek container itself. Empty by default.
securityContext: {}

# Optional image pull secrets for private registries
imagePullSecrets: []
  # - name: my-registry-secret

service:
  type: ClusterIP
  port: 3000

env:
  NODE_ENV: production
  PORT: 3000
  # TZ: "UTC"
  # Timezone for logs, reminders, and cron jobs (e.g. Europe/Berlin).
  # LOG_LEVEL: "info"
  # "info" = concise user actions, "debug" = verbose details.
  # TREK_WIKI_DIR: "/app/wiki"
  # Where the in-app Help pages (/help) read their content from. Leave unset: the
  # image ships the wiki at /app/wiki and finds it automatically, so Help matches
  # the version you are running. Only set this to serve your own docs from a mounted
  # volume. If the path does not exist, Help falls back to fetching the public GitHub
  # wiki, which needs egress and tracks the latest release rather than your version.
  # 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: ar, az, br, ca, cs, de, en, es, et, fr, gr, hu, id, it, ja, ko, nl, pl, ru, sk, sv, th, tr, uk, vi, zh, zh-TW
  # ALLOWED_ORIGINS: ""
  # NOTE: If using ingress or HTTPRoute, ensure env.ALLOWED_ORIGINS matches the public domains for proper CORS configuration.
  # APP_URL: "https://trek.example.com"
  # Public base URL of this instance. Required when OIDC is enabled — must match the redirect URI registered with your IdP.
  # Also used as the base URL for links in email notifications and other external links.
  # FORCE_HTTPS: "false"
  # Optional. When "true": HTTPS redirect, HSTS, CSP upgrade-insecure-requests, secure cookies. Only behind a TLS proxy. Requires TRUST_PROXY.
  # HSTS_INCLUDE_SUBDOMAINS: "false"
  # When "true": adds includeSubDomains to the HSTS header. Only effective when HSTS is active. Leave "false" if sibling subdomains still run over plain HTTP.
  # COOKIE_SECURE: "true"
  # Auto-derived (true in production or when FORCE_HTTPS=true). Set "false" to force cookies over plain HTTP. Not recommended for production.
  # SESSION_DURATION: "24h"
  # How long a login session stays valid when "Remember me" is unchecked (the default): trek_session JWT exp + a browser-session cookie. Accepts 1h, 12h, 7d, 30d, 90d. Defaults to 24h.
  # SESSION_DURATION_REMEMBER: "30d"
  # Session length when "Remember me" is ticked: a longer-lived JWT + persistent cookie that survives browser restarts. Same format as SESSION_DURATION. Defaults to 30d.
  # TRUST_PROXY: "1"
  # Trusted proxy hops for X-Forwarded-For/X-Forwarded-Proto. Defaults to 1 in production. Must be set for FORCE_HTTPS to work.
  # ALLOW_INTERNAL_NETWORK: "false"
  # Set to "true" if Immich or other integrated services are hosted on a private/RFC-1918 network address.
  # Loopback (127.x) and link-local/metadata addresses (169.254.x) are always blocked.
  # ALLOW_LINK_LOCAL_IPS: ""
  # Comma-separated single link-local addresses TREK may reach after all, e.g. "169.254.1.2" for a host gateway.
  # 169.254.169.x and 169.254.170.x (cloud metadata) cannot be listed; an invalid entry aborts startup.
  # OIDC_ISSUER: ""
  # OpenID Connect provider URL.
  # OIDC_CLIENT_ID: ""
  # OIDC client ID.
  # OIDC_DISPLAY_NAME: "SSO"
  # Label shown on the SSO login button.
  # OIDC_ONLY: "false"
  # Set to "true" to force SSO-only mode: disables password login and password registration.
  # Overrides the granular toggles in Admin > Settings and cannot be changed at runtime.
  # First SSO login becomes admin on a fresh instance.
  # OIDC_ADMIN_CLAIM: ""
  # OIDC claim used to identify admin users.
  # OIDC_ADMIN_VALUE: ""
  # Value of the OIDC claim that grants admin role.
  # OIDC_USERNAME_CLAIM: ""
  # Claim a new account's username comes from, e.g. "preferred_username". Unset: name, then preferred_username.
  # OIDC_SCOPE: "openid email profile groups"
  # Space-separated OIDC scopes to request. Must include scopes for any claim used by OIDC_ADMIN_CLAIM.
  # OIDC_DISCOVERY_URL: ""
  # Override the OIDC discovery endpoint for providers with non-standard paths (e.g. Authentik).
  # HTTP_PROXY: ""
  # HTTPS_PROXY: ""
  # NO_PROXY: "localhost,127.0.0.1"
  # Outbound proxy for TREK's requests to the internet; NO_PROXY lists hosts that bypass it.
  # DEMO_MODE: "false"
  # Enable demo mode (hourly data resets).
  # MCP_RATE_LIMIT: "300"
  # Max MCP API requests per user per minute. Defaults to 300.
  # MCP_MAX_SESSION_PER_USER: "20"
  # Max concurrent MCP sessions per user. Defaults to 20.
  # NOMINATIM_URL: ""
  # Custom Nominatim base URL for every geocoding call the server makes (place search, reverse lookup, Atlas region
  # fill). When set it REPLACES the public OpenStreetMap service, with no fallback, so the instance behind it needs
  # the coverage you expect and has to speak the Nominatim API. TREK keeps its ~1 request per second spacing either
  # way, and search and reverse lookups no longer go to the TREK services' Photon. Defaults to
  # https://nominatim.openstreetmap.org.
  # OVERPASS_URL: ""
  # Custom Overpass endpoint(s) for the map POI "explore" search, comma-separated. When set, REPLACES the bundled
  # public mirrors — point it at an internal/self-hosted Overpass instance when the public mirrors are unreachable
  # from the cluster (e.g. locked-down egress). Non-http(s) entries are ignored.
  # OVERPASS_TIMEOUT_MS: "25000"
  # Per-endpoint timeout (ms) for Overpass POI requests. The query itself gives Overpass 20 seconds of work, so a
  # lower value hangs up on answers that were still coming. Raise it for a slow self-hosted Overpass instance.
  # Defaults to 25000.
  # TREK_PLACES_ENABLED: "false"
  # Place search (suggestions, full search, category buttons, Road trip search, import geocoding, offline downloads,
  # and the OpenStreetMap ways and horse routes Tours reads) asks the TREK Places API at https://places.liketrek.com by default, so the pod makes outbound requests to that
  # host. Set "false" to search the way it did before 4.3.0 (OpenStreetMap, or your Google/Amap key) and send
  # nothing there. There is no switch in the admin panel on purpose: whether searches leave the instance is decided
  # here. Defaults to on.
  # TREK_PLACES_URL: ""
  # GOOGLE_LIST_DATA_BASE: ""
  # Base URL of a copy of the Places API you run yourself; it has to answer the same /v1 API. Read from
  # configuration rather than typed by a user, so an in-cluster address works without ALLOW_INTERNAL_NETWORK.
  # Defaults to https://places.liketrek.com.
  # TREK_PLACES_CONTRIBUTE: "off"
  # Whether an admin may let this installation send the place details its users typed in (website, phone, e-mail,
  # opening hours, description, picture) to the TREK Places API. "admin" leaves the choice to the admin panel, where
  # it stays off until an admin agrees; "off" takes it away. Defaults to admin.
  # TREK_SERVICES: "off"
  # Places search identifies this installation with a key it registers by itself on first use and keeps in the
  # database. "off" sends no key; searches then use the shared pool. A key issued to you goes under
  # secretEnv.TREK_SERVICES_KEY. Defaults to auto.
  # TREK_SERVICES_HOSTS: ""
  # Comma-separated hosts that receive the installation key over https. Defaults to
  # places.liketrek.com,photon.liketrek.com,valhalla.liketrek.com.
  # TREK_PHOTON_URL: ""
  # The address search (Photon) of the TREK services. With a key, search and reverse lookups ask it before
  # Nominatim and fall back to Nominatim when it does not answer. Never asked when NOMINATIM_URL is set.
  # Defaults to https://photon.liketrek.com.
  # TREK_VALHALLA_URL: ""
  # The Valhalla of the TREK services, which this server relays routing to unless the admin picks another
  # routing service. The browser never talks to it. Defaults to https://valhalla.liketrek.com.
  # TREK_WALLET_SIGNER_URL: ""
  # Signs the Apple Wallet pass of a booking when someone taps "Add to Apple Wallet" in the iOS app.
  # Only the pass's texts go there, once per tap. Never asked with TREK_SERVICES=off.
  # Defaults to https://push.liketrek.com/v1/wallet/pass.
  # AMAP_API_BASE: ""
  # Send the Amap (高德地图) calls through an egress proxy, a cache or a gateway that speaks the same API instead of
  # restapi.amap.com directly. The key itself is a credential and goes under secretEnv.AMAP_API_KEY, or into
  # Admin > Settings > API Keys. Defaults to https://restapi.amap.com.
  # VAPID_PUBLIC_KEY: ""
  # Web Push key pair, public half (base64url, 65 bytes). Leave both halves empty and TREK generates a pair on
  # first start and keeps it in the database, so it travels with backups. To use your own pair, set this and
  # secretEnv.VAPID_PRIVATE_KEY together, e.g. from `npx web-push generate-vapid-keys`. Changing the pair later
  # means every device has to turn push on again.
  # VAPID_SUBJECT: ""
  # The contact push services see with every Web Push message: a mailto: address or an https:// URL. Defaults to
  # APP_URL when it is an https:// address other than localhost, else https://github.com/liketrek/TREK. No email
  # address is sent unless you set one here.


# Database. Empty (the default) keeps TREK on its SQLite file in the data volume. Set url to
# run TREK on a PostgreSQL database instead (see the wiki page Database-Postgres). The URL
# carries the password, so it is never a plain env value: with url, the chart writes it into
# its own Secret as TREK_DB_URL; with existingSecret, TREK reads TREK_DB_URL from that Secret
# under existingSecretKey and the chart writes nothing. existingSecret wins over url. The
# variable is required when either is set: a missing Secret key stops the pod instead of
# starting it on SQLite. The role in the URL owns TREK's database and must not be a superuser
# (nor a member of one, nor hold a right that reaches the server's files or programs): a
# restore runs the backup's SQL as that role and refuses one that could reach the database host. The wiki page shows the
# SQL that creates such a role. PostgreSQL 14 to 18 is supported.
#   url: "postgres://trek:<password>@postgres.example.internal:5432/trek?sslmode=require"
database:
  url: ""
  existingSecret: ""
  existingSecretKey: TREK_DB_URL

# Secret environment variables stored in a Kubernetes Secret.
# JWT_SECRET is managed entirely by the server (auto-generated into the data PVC,
# rotatable via the admin panel) — it is not configured here.
secretEnv:
  # At-rest encryption key for stored secrets (API keys, MFA, SMTP, OIDC, etc.).
  # Recommended: set to a random 32-byte hex value (openssl rand -hex 32).
  # If left empty the server resolves the key automatically:
  #   1. data/.jwt_secret (existing installs — encrypted data stays readable after upgrade)
  #   2. data/.encryption_key auto-generated on first start (fresh installs)
  ENCRYPTION_KEY: ""
  # Initial admin account — only used on first boot when no users exist yet.
  # If both values are non-empty the admin account is created with these credentials.
  # If either is empty a random password is generated and printed to the server log.
  ADMIN_EMAIL: ""
  ADMIN_PASSWORD: ""
  # OIDC client secret — set together with env.OIDC_ISSUER and env.OIDC_CLIENT_ID.
  OIDC_CLIENT_SECRET: ""
  # Optional Unsplash Access Key for trip-cover and place-image search.
  # Without one, TREK uses Unsplash's unauthenticated endpoint, which some
  # datacenter/VPS IPs (including many Kubernetes clusters) are blocked from.
  # Get a free key at https://unsplash.com/developers. Can also be set per-admin
  # in Admin > Settings; this value overrides that. Leave empty to disable.
  UNSPLASH_ACCESS_KEY: ""
  # Optional Google Maps API key (Places API (New) enabled) for place search, photos,
  # details and Google transit. Overrides the key set in Admin > Settings > API Keys,
  # whose field then shows this variable read-only. Leave empty to use the key from the
  # admin panel, or none.
  PLACES_API_KEY: ""
  # Optional Amap (高德地图) Web 服务 key for place search and geocoding inside mainland
  # China. Overrides the key set in Admin > Settings > API Keys. A Web 端 (JS API) key is
  # a different credential and is rejected with INVALID_USER_KEY. Leave empty to use the
  # key from the admin panel, or none.
  AMAP_API_KEY: ""
  # The private secret (数字签名) of that key. Required exactly when the key was created
  # with signing enabled, because such a key rejects every unsigned request. Leave empty
  # otherwise. The endpoint itself is not a secret and is set under env.AMAP_API_BASE.
  AMAP_API_SECRET: ""
  # Optional key issued for this installation by the TREK services. Wins over the key TREK
  # registers by itself and turns that registration off. Leave empty to let TREK register.
  TREK_SERVICES_KEY: ""
  # Optional Web Push key pair, private half (base64url, 32 bytes). Only used together with
  # env.VAPID_PUBLIC_KEY; a pair whose halves do not belong together, or only one half, turns
  # push off with an error in the log until it is fixed, and every device stays registered.
  # Leave both empty to let TREK keep a generated pair in its database.
  VAPID_PRIVATE_KEY: ""

# If true, a random ENCRYPTION_KEY is generated at install and preserved across upgrades.
# Only with helm install/upgrade against the cluster: under `helm template`, ArgoCD or Flux
# the chart cannot read the existing secret and renders a new key every time. TREK then
# refuses to start rather than lose its secrets; use existingSecret in those setups.
generateEncryptionKey: false

# If set, the chart renders no Secret of its own and instead reads every secret env
# var from this existing Kubernetes secret. Expected keys: ENCRYPTION_KEY (rename via
# existingSecretKey), ADMIN_EMAIL, ADMIN_PASSWORD, OIDC_CLIENT_SECRET,
# UNSPLASH_ACCESS_KEY, PLACES_API_KEY, AMAP_API_KEY, AMAP_API_SECRET, TREK_SERVICES_KEY,
# VAPID_PRIVATE_KEY, SMTP_PASS, MAPBOX_ACCESS_TOKEN, CARTO_API_KEY, DEMO_ADMIN_PASS.
# Missing keys are simply left unset (they are optional), so only provide the ones your
# setup needs.
existingSecret: ""
existingSecretKey: ENCRYPTION_KEY

persistence:
  # When disabled, volumes fall back to an ephemeral emptyDir (data lost on pod restart).
  enabled: true
  data:
    size: 1Gi
    # Leave empty to use the cluster's default StorageClass; set to bind a specific class.
    storageClassName: ""
    # Access modes of the claim. ReadWriteMany lets another pod mount the volume, for
    # example a backup sidecar, but only for reading: SQLite needs every writer on one
    # host, so two pods writing travel.db over a network filesystem corrupt it.
    accessModes:
      - ReadWriteOnce
    # Bind an existing PVC. The other values (size, storageClassName, accessModes,
    # annotations) are then ignored.
    existingClaim: ""
    annotations: {}
  uploads:
    size: 1Gi
    storageClassName: ""
    # Access modes of the claim; ReadWriteMany lets other pods read or add uploads.
    accessModes:
      - ReadWriteOnce
    # Specify an existing PVC to bind. The other values are then ignored.
    existingClaim: ""
    annotations: {}

# Readiness and liveness probes. Overrides are merged over these defaults, so a key you
# do not set stays as shipped: --set probes.liveness.initialDelaySeconds=60 keeps the
# httpGet handler. Switching handler means clearing the old one in the same override
# (httpGet: null together with tcpSocket), otherwise the API rejects the pod with
# "may not specify more than 1 handler type". Set probes.liveness to null to drop a probe.
#
# The startup probe gives a first boot, a long migration or a restore at boot up to ten
# minutes before liveness takes over; liveness alone killed such a boot after about
# 105 s, and the next start began it again. Readiness asks the database, so a pod whose
# database does not answer stops getting traffic without being restarted.
probes:
  startup:
    httpGet:
      path: /api/health
      port: http
    periodSeconds: 10
    failureThreshold: 60
  liveness:
    httpGet:
      path: /api/health
      port: http
    periodSeconds: 30
  readiness:
    httpGet:
      path: /api/health/ready
      port: http
    periodSeconds: 10

# Further environment variables, for any setting the env block above does not list.
#   extraEnv:
#     - name: SESSION_DURATION
#       value: 7d
extraEnv: []
# Whole ConfigMaps or Secrets:
#   extraEnvFrom:
#     - secretRef:
#         name: trek-smtp
extraEnvFrom: []

# Further volumes for the pod. The chart does not create the objects they name.
#   extraVolumes:
#     - name: kitinerary-extractors
#       configMap:
#         name: trek-kitinerary-extractors
extraVolumes: []
# Where the trek container mounts them. For example, KItinerary
# loads extractors for the booking import from this path:
#   extraVolumeMounts:
#     - name: kitinerary-extractors
#       mountPath: /usr/local/share/kitinerary/extractors
#       readOnly: true
extraVolumeMounts: []

# Further Kubernetes objects the chart renders next to its own, for example a Job, a
# CronJob or a ConfigMap. Each item is rendered as written, either as a map or as a
# string of YAML, and {{ }} in it is evaluated, so {{ include "trek.fullname" . }} or
# {{ .Release.Name }} work, in both forms. Write literal braces as {{ "{{" }}.
# A backup job must only read the data volume: it also holds the encryption key and the
# server's secrets, and a second writer corrupts travel.db. Rather than copying the live
# travel.db, copy TREK's own backups (Admin, Backup, automatic backups) from backups/ in
# that volume. Those archives carry .encryption_key too (unless ENCRYPTION_KEY is set),
# so protect the job's destination like the data volume itself.
#   extraObjects:
#     - apiVersion: v1
#       kind: ConfigMap
#       metadata:
#         name: '{{ include "trek.fullname" . }}-extra'
#       data:
#         note: hello
#     - |
#       apiVersion: v1
#       kind: ConfigMap
#       metadata:
#         name: {{ .Release.Name }}-notes
extraObjects: []

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    cpu: 500m
    memory: 512Mi

ingress:
  enabled: false
  className: ""
  annotations: {}
  hosts:
    - host: chart-example.local
      paths:
        - /
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

httpRoute:
  enabled: false
  annotations: {}
  parentRefs: []
  #   - name: gateway
  #     namespace: gateway-system
  #     sectionName: https
  hostnames: []
  #   - trek.example.com
  paths:
    - /
  # Timeout fields are Standard Channel in Gateway API v1.2; controller support varies.
  # Leave empty for controller defaults. Use "0s" to disable the corresponding timeout.
  timeouts: {}
  #   request: "0s"
  #   backendRequest: "0s"