mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 09:21:33 +00:00
- mesh_data_store.py / env/store.py: make refresh() async, offload blocking polls via asyncio.to_thread/gather so 7 lockstep sources no longer starve the shared event loop. - main.py: gather pollers concurrently + set_default_executor thread pool. - Dockerfile / docker-compose.yml: healthcheck now curls the dashboard for a real liveness signal instead of a process-exists check. - transport/meshcore_transport.py: MeshCore keepalive loop (get_time() every 120s), reconnect re-arm (_post_reconnect_setup_async from _on_connect_event), and MC channel-name normalization (_resolve_mc_channel_idx strips a leading #). - dashboard-frontend: MeshCoreConnection.tsx config-page hardening, new ErrorBoundary component, wired into App.tsx. - tests: fix ~40 call sites broken by refresh() becoming async ( test_generic_http.py, test_store_received_delta.py, test_store_wzdx_persist.py) by wrapping with asyncio.run(), matching this suite's existing convention for calling async code from sync test functions. Verified: all 40 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
97 lines
2.9 KiB
YAML
97 lines
2.9 KiB
YAML
# MeshAI Docker Compose Configuration
|
|
#
|
|
# Usage:
|
|
# docker compose up -d # Start the bot + dashboard
|
|
# docker compose logs -f # View logs
|
|
#
|
|
# Dashboard: http://localhost:8080
|
|
#
|
|
# Config lives in the meshai_data volume. On first boot MeshAI writes a
|
|
# starter single file at /data/config.yaml (that's the legacy fallback
|
|
# layout, not the primary one) plus an empty /data/secrets/.env; configure
|
|
# everything from the dashboard from there. MeshAI also supports a fully
|
|
# split /data/config/ directory (config.yaml + one file per domain) and
|
|
# prefers it automatically when present -- see README's "Advanced" section
|
|
# for the migration path. Secrets always live in /data/secrets/.env, never
|
|
# in the YAML.
|
|
#
|
|
# For serial connection (USB), uncomment the devices section below
|
|
# For TCP connection, use the dashboard (or edit the YAML directly)
|
|
|
|
services:
|
|
meshai:
|
|
# Pull from GitHub Container Registry
|
|
# image: ghcr.io/zvx-echo6/meshai:latest
|
|
|
|
# Uncomment to build locally instead of pulling
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
# args:
|
|
# UID: ${UID:-1000}
|
|
# GID: ${GID:-1000}
|
|
|
|
container_name: meshai
|
|
restart: unless-stopped
|
|
|
|
# Resolve external HTTP feeds via the LXC host's working resolver
|
|
# (Tailscale MagicDNS, 100.100.100.100). The Docker daemon default
|
|
# of 1.1.1.1/8.8.8.8 is unreachable from this container's NAT egress,
|
|
# which silently broke NWS/SWPC/meshview hostname resolution.
|
|
dns:
|
|
- 100.100.100.100
|
|
- 1.1.1.1
|
|
|
|
# Uncomment for USB serial connection to Meshtastic device
|
|
# devices:
|
|
# - /dev/ttyUSB0:/dev/ttyUSB0
|
|
# - /dev/ttyACM0:/dev/ttyACM0
|
|
|
|
ports:
|
|
# Dashboard API
|
|
- "8080:8080"
|
|
|
|
volumes:
|
|
# Persistent data (database, config)
|
|
- meshai_data:/data
|
|
|
|
# Allocate a TTY for cleaner log output
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
environment:
|
|
# API key can be set here or in config.yaml
|
|
- LLM_API_KEY=${LLM_API_KEY:-}
|
|
# Staged cutover: categories fully migrated to the new formatter+decider
|
|
# pipeline. Append new categories here as they clear shadow bake.
|
|
- MESHAI_CUTOVER_CATEGORIES=earthquake_event,geomagnetic_storm,rf_propagation_alert,avalanche_warning,avalanche_watch,weather_warning,weather_statement,weather_watch,weather_advisory,work_zone,road_incident,road_closure,traffic_congestion,stream_flow,wildfire_declared,wildfire_incident,wildfire_closed
|
|
|
|
# Limit resources
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 3G
|
|
reservations:
|
|
memory: 64M
|
|
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f -s -o /dev/null http://localhost:8080/ || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 240s
|
|
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
|
|
volumes:
|
|
meshai_data:
|
|
name: meshai_data
|
|
|
|
networks:
|
|
default:
|
|
name: meshai_network
|