mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 15:14:45 +02:00
- 6a: Change healthcheck in Dockerfile and docker-compose.yml to verify the PID file exists and the process is alive (kill -0) instead of testing SQLite connectivity, which only proves the DB file exists - 6b: In DMs, skip !commands so MeshMonitor or other bots handle them. MeshAI only responds conversationally in DMs (no bang commands) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
# 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:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
UID: ${UID:-1000}
|
|
GID: ${GID:-1000}
|
|
image: meshai:latest
|
|
container_name: meshai
|
|
restart: unless-stopped
|
|
|
|
# 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"
|
|
|
|
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: 256M
|
|
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
|