1
0
forked from iarv/mc-webui
Files
mc-webui/docker-compose.yml
MarekWo a5f7fd59e6 feat: Add interactive meshcli console with WebSocket support
- Add Flask-SocketIO backend with gevent for real-time communication
- Create chat-style console UI showing only user's command responses
- WebSocket commands tracked separately from HTTP API (ws_ prefix)
- Console accessible from main menu as fullscreen modal
- Command history navigation with arrow keys
- Auto-reconnection on disconnect
- Update service worker cache for offline support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:27:42 +01:00

70 lines
2.1 KiB
YAML

services:
# MeshCore Bridge - Handles USB communication with meshcli
meshcore-bridge:
build:
context: ./meshcore-bridge
dockerfile: Dockerfile
container_name: meshcore-bridge
restart: unless-stopped
devices:
- "${MC_SERIAL_PORT}:${MC_SERIAL_PORT}"
ports:
- "5001:5001" # Expose for WebSocket console access
volumes:
- "${MC_CONFIG_DIR}:/root/.config/meshcore:rw"
environment:
- MC_SERIAL_PORT=${MC_SERIAL_PORT}
- MC_CONFIG_DIR=/root/.config/meshcore
- MC_DEVICE_NAME=${MC_DEVICE_NAME}
- TZ=${TZ:-UTC}
networks:
- meshcore-net
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5001/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Main Web UI - Communicates with bridge via HTTP
mc-webui:
build:
context: .
dockerfile: Dockerfile
container_name: mc-webui
restart: unless-stopped
ports:
- "${FLASK_PORT:-5000}:5000"
volumes:
- "${MC_CONFIG_DIR}:/root/.config/meshcore:rw"
- "${MC_ARCHIVE_DIR:-./archive}:/root/.archive/meshcore:rw"
environment:
- MC_BRIDGE_URL=http://meshcore-bridge:5001/cli
- MC_DEVICE_NAME=${MC_DEVICE_NAME}
- MC_CONFIG_DIR=/root/.config/meshcore
- MC_INACTIVE_HOURS=${MC_INACTIVE_HOURS:-48}
- MC_ARCHIVE_DIR=/root/.archive/meshcore
- MC_ARCHIVE_ENABLED=${MC_ARCHIVE_ENABLED:-true}
- MC_ARCHIVE_RETENTION_DAYS=${MC_ARCHIVE_RETENTION_DAYS:-7}
- FLASK_HOST=${FLASK_HOST:-0.0.0.0}
- FLASK_PORT=${FLASK_PORT:-5000}
- FLASK_DEBUG=${FLASK_DEBUG:-false}
- TZ=${TZ:-UTC}
env_file:
- .env
depends_on:
meshcore-bridge:
condition: service_healthy
networks:
- meshcore-net
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
meshcore-net:
driver: bridge