hermes
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
Hermes Docker Swarm stack
|
||||
|
||||
Deploy Hermes agent and gateway with GitHub Copilot and Telegram chat integration.
|
||||
|
||||
This stack uses the official Hermes Docker image from Nous Research: `nousresearch/hermes-agent:latest`.
|
||||
|
||||
The browser-accessible Hermes dashboard is published on host port `8087`.
|
||||
|
||||
Usage
|
||||
|
||||
|
||||
|
||||
1. Create Docker secrets for the required credentials:
|
||||
|
||||
```bash
|
||||
docker secret create hermes_github_copilot_api_key /path/to/copilot-key.txt
|
||||
docker secret create hermes_telegram_bot_token /path/to/telegram-bot-token.txt
|
||||
docker secret create hermes_telegram_chat_id /path/to/chat-id.txt
|
||||
docker secret create hermes_telegram_allow_from /path/to/telegram-allow-from.txt
|
||||
```
|
||||
|
||||
2. Create Docker secrets from the provided keys:
|
||||
|
||||
```bash
|
||||
docker secret rm hermes_telegram_bot_token
|
||||
docker secret rm hermes_telegram_chat_id
|
||||
docker secret rm hermes_telegram_allow_from
|
||||
docker secret rm hermes_github_copilot_api_key
|
||||
|
||||
|
||||
echo -n '<TODO>' | docker secret create hermes_telegram_bot_token -
|
||||
echo -n '<TODO>' | docker secret create hermes_telegram_chat_id -
|
||||
echo -n '<TODO>' | docker secret create hermes_telegram_allow_from -
|
||||
echo -n '<TODO>' | docker secret create hermes_github_copilot_api_key -
|
||||
```
|
||||
|
||||
3. Deploy the stack:
|
||||
|
||||
```bash
|
||||
docker stack deploy -c stack-compose.yml hermes
|
||||
```
|
||||
|
||||
3. Verify services:
|
||||
|
||||
```bash
|
||||
docker stack services hermes
|
||||
```
|
||||
|
||||
Configuration
|
||||
|
||||
- `GITHUB_COPILOT_API_KEY` is provided to both Hermes services via secret.
|
||||
- `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are provided via secrets.
|
||||
- `hermes-gateway` listens on port `8080` and connects to `hermes-agent`.
|
||||
- Replace the image references with your actual Hermes Agent and Gateway images if needed.
|
||||
@@ -0,0 +1,55 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
hermes-gateway:
|
||||
image: nousresearch/hermes-agent:latest
|
||||
command: gateway run
|
||||
networks:
|
||||
- hermes
|
||||
- nginx_ingress
|
||||
ports:
|
||||
- published: 8087
|
||||
target: 9119
|
||||
protocol: tcp
|
||||
volumes:
|
||||
- hermes_gateway_data:/opt/data
|
||||
environment:
|
||||
- HERMES_DASHBOARD=1
|
||||
- HERMES_DASHBOARD_HOST=0.0.0.0
|
||||
- HERMES_DASHBOARD_BASIC_AUTH_USERNAME=admin
|
||||
- HERMES_DASHBOARD_BASIC_AUTH_PASSWORD=admin
|
||||
|
||||
- HERMES_AGENT_URL=http://hermes-agent:8000
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
hermes-agent:
|
||||
image: nousresearch/hermes-agent:latest
|
||||
depends_on:
|
||||
- hermes-gateway
|
||||
networks:
|
||||
- hermes
|
||||
command: sleep infinity
|
||||
volumes:
|
||||
- hermes_agent_data:/opt/data
|
||||
environment:
|
||||
- TELEGRAM_HOME_CHANNEL_NAME=Default
|
||||
|
||||
- HERMES_GATEWAY_URL=http://hermes-gateway:8080
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
networks:
|
||||
hermes:
|
||||
driver: overlay
|
||||
nginx_ingress:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
hermes_gateway_data:
|
||||
hermes_agent_data:
|
||||
|
||||
Reference in New Issue
Block a user