Update deployment.yaml
This commit is contained in:
parent
235a42cb2b
commit
2ed7ac55dc
1 changed files with 22 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue