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"]
|
command: ["/bin/bash", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
# Make `hermes` CLI instantly available when you exec in
|
set -euo pipefail
|
||||||
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
|
|
||||||
echo "Hermes Agent starting (Telegram polling + full config persistence)..."
|
echo "Hermes Agent starting (Telegram polling + full config persistence)..."
|
||||||
exec hermes gateway run
|
|
||||||
HERMES_BIN="/opt/hermes/.venv/bin/hermes"
|
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:
|
env:
|
||||||
# === Hermes Home - REQUIRED for config persistence ===
|
# === Hermes Home - REQUIRED for config persistence ===
|
||||||
- name: HERMES_HOME
|
- name: HERMES_HOME
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue