refactor: move source tree into work/, multi-stage Docker build, fix satpass

- Move all application source (meshai/, dashboard-frontend/, tests/,
  config/, docs/, Dockerfile, etc.) into work/ directory
- Add Node.js multi-stage build to Dockerfile for frontend compilation;
  remove compiled static assets from git tracking
- Fix satpass missing time windows: consolidation was splitting wire on
  newline and only putting line 1 in event.title, dropping the time
  window line that the composer uses for precomposed broadcasts
- Fix satpass burst flooding: stagger consolidation timers (+60s per
  pending pass) so Central batch publishes don't blast the mesh
- Update CI workflow build context to work/
- Anchor lib/ and data/ gitignore patterns to repo root to prevent
  false matches on nested directories
- Add dashboard-frontend/node_modules/ to .dockerignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu 2026-06-16 03:40:31 +00:00
commit 2e1fb325f7
283 changed files with 109402 additions and 483 deletions

89
work/docker-compose.yml Normal file
View file

@ -0,0 +1,89 @@
# MeshAI Docker Compose Configuration
#
# Usage:
# docker compose up -d # Start bot + web config
# docker compose logs -f # View logs
#
# Web config: http://localhost:7682 (TUI in browser)
#
# Config is stored in the meshai_data volume at /data/config.yaml
#
# For serial connection (USB), uncomment the devices section below
# For TCP connection, configure via web interface
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:
# Web-based config interface (ttyd)
- "7682:7682"
# Dashboard API
- "8080:8080"
volumes:
# Persistent data (database, config)
- meshai_data:/data
# Run interactively for first-time setup wizard
stdin_open: true
tty: true
environment:
# API key can be set here or in config.yaml
- LLM_API_KEY=${LLM_API_KEY:-}
# Limit resources
deploy:
resources:
limits:
memory: 3G
reservations:
memory: 64M
healthcheck:
test: ["CMD-SHELL", "test -f /tmp/meshai.pid && kill -0 $(cat /tmp/meshai.pid) 2>/dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
meshai_data:
name: meshai_data
networks:
default:
name: meshai_network