Fix healthcheck to verify PID and add DM-only conversational mode

- 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>
This commit is contained in:
Ubuntu 2026-02-23 20:18:27 +00:00
commit ab7e52b9fb
3 changed files with 6 additions and 7 deletions

View file

@ -53,7 +53,7 @@ services:
memory: 64M
healthcheck:
test: ["CMD", "python", "-c", "import sqlite3; sqlite3.connect('/data/conversations.db').execute('SELECT 1')"]
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