CI / build + unit (pull_request) Successful in 1m17s
Rewire MeshService off the raw TCP socket + codec onto the Phase-1 MeshMonitorClient contract (HttpMeshMonitorClient in production, FakeMeshMonitorClient in tests): status/messages/nodes/channels/telemetry are polled (15s/1s/30s/5min/60s) instead of streamed, outbound broadcasts and DMs go through client.send(), respond/inject/notifier/command/battery/ weather behavior and all /api/* + MCP endpoint shapes are preserved. The fake TCP bridge is deleted and every consumer spec (mesh service, MCP controller, command auto-responder, battery alerts) now drives the real service through the widened fake client. Docker compose drops MESH_HOST/MESH_PORT and adds the MESHMONITOR_* env (token from .env, self-signed TLS via NODE_TLS_REJECT_UNAUTHORIZED=0). Live smoke against https://meshmonitor.kkhost.pl: getStatus -> {connected:true, myNodeNum:3994646728, longName:'SP8MK Bot', nodeResponsive:true}; getNodes -> 104 nodes. Build green, suite 17 files / 245 tests (baseline 234).
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
services:
|
|
bot:
|
|
build: .
|
|
environment:
|
|
TZ: Europe/Warsaw
|
|
MESHMONITOR_API_TOKEN: ${MESHMONITOR_API_TOKEN:-}
|
|
MESHMONITOR_API_BASE: ${MESHMONITOR_API_BASE:-https://meshmonitor.kkhost.pl/api/v1}
|
|
MESHMONITOR_SOURCE: ${MESHMONITOR_SOURCE:-default}
|
|
MESHMONITOR_TIMEOUT_MS: ${MESHMONITOR_TIMEOUT_MS:-15000}
|
|
# the gateway uses a self-signed certificate
|
|
NODE_TLS_REJECT_UNAUTHORIZED: '0'
|
|
MESH_DB_PATH: ./data/mesh-bot.db
|
|
MESH_POLL_MS: '1000'
|
|
MESH_NOTIFY_CHANNEL: '${MESH_NOTIFY_CHANNEL:-3}'
|
|
OPENCODE_API: ${OPENCODE_API:-http://172.24.0.1:9898}
|
|
OPENCODE_WORKSPACE_PATH: ${OPENCODE_WORKSPACE_PATH:-/home/krzyw/projects/sandbox/mesh-bot}
|
|
OPENCODE_SESSION: ${OPENCODE_SESSION:-}
|
|
OPENCODE_USER: ${OPENCODE_USER:-}
|
|
OPENCODE_PASS: ${OPENCODE_PASS:-}
|
|
WEATHER_CRON: ${WEATHER_CRON:-}
|
|
volumes:
|
|
- mesh_data:/app/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- dev_net
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.mesh-bot.rule=Host(`bot.dev.kkhost.pl`)'
|
|
- 'traefik.http.routers.mesh-bot.entrypoints=web'
|
|
- 'traefik.http.services.mesh-bot.loadbalancer.server.port=3000'
|
|
volumes:
|
|
mesh_data:
|
|
|
|
networks:
|
|
dev_net:
|
|
external: true
|