Add Maria WhatsApp+RAG bridge as a service (LXC 171)
Move the /tmp prototype (Baileys bridge + RAG consumer) into git as a proper sibling project to discord-bridge/: own systemd --user units (whatsapp bridge, rag consumer, dashboard, periodic Drive sync timer), a filesystem document store with a stdlib control dashboard (start/ stop/restart, document CRUD, reindex, Google Drive sync via rclone), and an idempotent ops/install.sh following the same conventions. Co-Authored-By: Claude Agent <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Unit systemd de UTILIZATOR pentru consumer-ul RAG al lui Maria (rag/consumer.py).
|
||||
#
|
||||
# Se instaleaza in ~/.config/systemd/user/maria-rag.service (vezi install.sh).
|
||||
#
|
||||
# systemctl --user daemon-reload
|
||||
# systemctl --user enable --now maria-rag
|
||||
# journalctl --user -u maria-rag -f
|
||||
|
||||
[Unit]
|
||||
Description=Consumer RAG pentru Maria — raspunde la mesajele din puntea WhatsApp
|
||||
Documentation=file:///workspace/romfastsql/proxmox/lxc171-claude-agent/maria-whatsapp-bridge/README.md
|
||||
After=network-online.target maria-whatsapp.service
|
||||
Wants=network-online.target
|
||||
# Nu e o dependinta stricta (poate porni si daca puntea WhatsApp inca nu e sus —
|
||||
# consumer.py doar face polling si tolereaza erori de retea), dar ordinea are sens.
|
||||
Wants=maria-whatsapp.service
|
||||
|
||||
StartLimitIntervalSec=300
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/workspace/romfastsql/proxmox/lxc171-claude-agent/maria-whatsapp-bridge/rag
|
||||
EnvironmentFile=%h/.maria-bridge/env
|
||||
Environment=MARIA_BRIDGE_DIR=%h/.maria-bridge
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
ExecStartPre=/bin/mkdir -p %h/.maria-bridge/logs %h/.maria-bridge/documents
|
||||
ExecStart=%h/.maria-bridge/venv/bin/python consumer.py
|
||||
|
||||
KillMode=control-group
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=15
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
RestartSteps=5
|
||||
RestartMaxDelaySec=120
|
||||
|
||||
MemoryHigh=256M
|
||||
MemoryMax=512M
|
||||
|
||||
StandardOutput=append:%h/.maria-bridge/logs/rag.log
|
||||
StandardError=append:%h/.maria-bridge/logs/rag.log
|
||||
SyslogIdentifier=maria-rag
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user