From 0dc49718732dc28feb2aee937ae8d700db61015d Mon Sep 17 00:00:00 2001 From: "Enot (ded) Skelly" Date: Tue, 9 Jun 2026 14:41:01 -0700 Subject: [PATCH] docs: update base config yaml file to match server example --- app_config/config.yaml.example | 63 +++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/app_config/config.yaml.example b/app_config/config.yaml.example index b497e0a..45618e0 100644 --- a/app_config/config.yaml.example +++ b/app_config/config.yaml.example @@ -1,4 +1,4 @@ -# Tower configuration file +# Beacon configuration file # Copy to config.yaml and adjust as needed. iatas: @@ -28,24 +28,29 @@ iatas: lng: -79.6248 regions: - - slug: swbc - name: Southwest BC + - slug: western-canada + name: Western Canada display_order: 1 center_lat: 51.0 center_lng: -114.0 zoom_level: 5 - iatas: [YCD, YQQ, YSE, YVR, YWS, YXX, YYK] + iatas: [YVR, YYJ, YYC, YEG] + + - slug: eastern-canada + name: Eastern Canada + display_order: 2 + center_lat: 45.0 + center_lng: -75.0 + zoom_level: 5 + iatas: [YOW, YYZ] channel_keys: - # Hashtag channels: Tower derives the PSK automatically from the tag name. + # Hashtag channels: Beacon derives the PSK automatically from the tag name. # secret = SHA256("#tag")[:16], channel_hash = SHA256(secret)[0] # Hashtag names should be provided without the # prefix. - # Tower prepends # automatically before deriving the key. + # Beacon prepends # automatically before deriving the key. hashtags: - meshcore - - ottawa - - testing - - towertest # Explicit keys: provide the channel hash (hex) and key (hex) directly. # An optional name can be set for display purposes. @@ -54,9 +59,49 @@ channel_keys: key: "8b3387e9c5cdea6ac9e5edbaa115cd72" name: "Public" +# Regional transport scopes for matching TRANSPORT_FLOOD packets. +# Plain names have # prepended automatically (e.g. "bc" → "#bc"). +scopes: + - name: bc + - name: "#west" + telemetry: retention: 672h # 4 weeks resolution: 1h # store one snapshot per observer per hour packets: retention: 720h # 30 days + +websocket: + max_connections_per_ip: 5 # default: 5 + +# Redis caching layer. +# If REDIS_ADDR is not set, caching is disabled and all reads go directly to PostgreSQL. +# TTLs are specified as duration strings e.g. "30m", "1h", "2h". +# Per-category TTLs override the global ttl. Any category left unset inherits ttl. +cache: + # Global default TTL for all cached responses. Defaults to 1h if not set. + ttl: "1h" + ttls: + # Aggregated stats endpoints (overview, observations, breakdowns, top nodes/observers, + # radio presets, scope stats). Backed by materialized views refreshed hourly. + stats: "1h" + # Mostly-static reference data (IATAs, regions, scopes). + # Only changes when new observers arrive or config is reseeded. + reference: "1h" + # Individual node detail. Also explicitly invalidated on upsert. + nodes: "1h" + # Individual observer detail. Also explicitly invalidated on upsert. + observers: "1h" + +# Geographic ingest filter (optional). +# Drop packets from observers outside the specified area at ingest time. +# Country codes are ISO 3166-1 alpha-2 (e.g. CA, US, GB). +# Continent codes: AF (Africa), AN (Antarctica), AS (Asia), +# EU (Europe), NA (North America), OC (Oceania), SA (South America). +# If both are set an IATA passes if it matches either (OR semantics). +# Omit this section entirely to accept packets from all IATAs (default). +#ingest: +# allow_countries: [CA, US] +# allow_continents: [NA] +