mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-29 15:31:38 +08:00
32 lines
832 B
Bash
32 lines
832 B
Bash
#!/bin/bash
|
|
# Docker entrypoint: bootstrap config files into the mounted volume, then run hermes.
|
|
set -e
|
|
|
|
HERMES_HOME="/opt/data"
|
|
INSTALL_DIR="/opt/hermes"
|
|
|
|
# Create directory structure
|
|
mkdir -p "$HERMES_HOME"/{cron,sessions,logs,pairing,hooks,image_cache,audio_cache,memories,skills,whatsapp/session}
|
|
|
|
# .env
|
|
if [ ! -f "$HERMES_HOME/.env" ]; then
|
|
cp "$INSTALL_DIR/.env.example" "$HERMES_HOME/.env"
|
|
fi
|
|
|
|
# config.yaml
|
|
if [ ! -f "$HERMES_HOME/config.yaml" ]; then
|
|
cp "$INSTALL_DIR/cli-config.yaml.example" "$HERMES_HOME/config.yaml"
|
|
fi
|
|
|
|
# SOUL.md
|
|
if [ ! -f "$HERMES_HOME/SOUL.md" ]; then
|
|
cp "$INSTALL_DIR/docker/SOUL.md" "$HERMES_HOME/SOUL.md"
|
|
fi
|
|
|
|
# Sync bundled skills (manifest-based so user edits are preserved)
|
|
if [ -d "$INSTALL_DIR/skills" ]; then
|
|
python3 "$INSTALL_DIR/tools/skills_sync.py"
|
|
fi
|
|
|
|
exec hermes "$@"
|