From b6ccfeb21fb48d57c748a06e776cabc3395c17cf Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Fri, 24 Apr 2026 18:37:52 -0300 Subject: [PATCH] Add Dockerfile with Ollama Cloud config for Railway deploy --- Dockerfile | 7 +++++++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ef5173d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM nousresearch/hermes-agent:latest + +RUN mkdir -p /opt/data/.hermes + +RUN printf 'model:\n provider: ollama-cloud\n default: gemma4:31b-cloud\n' > /opt/data/.hermes/config.yaml + +CMD ["hermes", "gateway"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..63a5944 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# Hermes Agent - Ollama Cloud Custom Image + +Custom Docker image for deploying Hermes Agent on Railway with Ollama Cloud provider and Gemma 4 31B model. + +## Why this exists + +The Hermes gateway ignores environment variables for the primary model configuration and only reads from `config.yaml`. This image bakes the correct config at build time, solving the fallback to `anthropic/claude-opus-4.6` issue. + +## Configuration + +The image pre-configures: +- **Provider**: `ollama-cloud` +- **Model**: `gemma4:31b-cloud` +- **Config path**: `/opt/data/.hermes/config.yaml` + +## Environment Variables (set in Railway) + +```env +HERMES_HOME=/opt/data/.hermes +API_SERVER_ENABLED=true +API_SERVER_KEY=your-secure-key +GATEWAY_ALLOW_ALL_USERS=false +HERMES_SOUL_OVERRIDE=Your custom soul prompt here +HERMES_STT_PROVIDER=local +HERMES_TTS_PROVIDER=disabled +OLLAMA_API_KEY=your-ollama-api-key +PORT=8642 +TELEGRAM_BOT_TOKEN=your-bot-token +TELEGRAM_ALLOWED_USERS=your-user-id +TELEGRAM_HOME_CHANNEL=your-channel-id +``` + +## Deploy to Railway + +1. Connect this GitHub repo to Railway +2. Railway auto-detects the Dockerfile +3. Add the environment variables above +4. Deploy + +## License + +MIT