From 2ed7ac55dc24a269473dbe226017cf976d2eccd8 Mon Sep 17 00:00:00 2001 From: sirius0xdev Date: Wed, 6 May 2026 16:43:30 -0400 Subject: [PATCH] Update deployment.yaml --- .../customer1/hermes-agent/deployment.yaml | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/apps/base/customer1/hermes-agent/deployment.yaml b/apps/base/customer1/hermes-agent/deployment.yaml index 2d5f1c0..49cc614 100644 --- a/apps/base/customer1/hermes-agent/deployment.yaml +++ b/apps/base/customer1/hermes-agent/deployment.yaml @@ -30,13 +30,30 @@ spec: command: ["/bin/bash", "-c"] args: - | - # Make `hermes` CLI instantly available when you exec in - ln -sf /opt/hermes/.venv/bin/hermes /usr/local/bin/hermes 2>/dev/null || true - # Copy config from ConfigMap (read-only mount) into PVC so Hermes can modify it - cp -f /etc/hermes/config.yaml /opt/data/config.yaml || true + set -euo pipefail echo "Hermes Agent starting (Telegram polling + full config persistence)..." - exec hermes gateway run + HERMES_BIN="/opt/hermes/.venv/bin/hermes" + + if [ ! -x "$HERMES_BIN" ]; then + echo "❌ hermes binary NOT FOUND at $HERMES_BIN" + echo "Searching filesystem..." + find / -name hermes -type f 2>/dev/null | head -10 || true + exit 1 + fi + + echo "✅ Found hermes at: $HERMES_BIN" + + # Copy config + cp -f /etc/hermes/config.yaml /opt/data/config.yaml || true + + # Create symlink in a writable location (PVC) so it works when you exec in + mkdir -p /opt/data/bin + ln -sf "$HERMES_BIN" /opt/data/bin/hermes || true + export PATH="/opt/data/bin:$PATH" + + echo "🚀 Starting hermes gateway..." + exec "$HERMES_BIN" gateway run env: # === Hermes Home - REQUIRED for config persistence === - name: HERMES_HOME