docs: update Docker deployment guide and compose config
- Update docker-compose.yml: use hermes-agent internal hostname for UPSTREAM, expose ports 8642-8670, add server data volume mapping - Rewrite docs/docker.md with pre-built image usage, env var table, data persistence (token location), port mapping, and common operations - Update README.md and README_zh.md Docker section with pre-built image instructions and token location Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+62
-18
@@ -4,48 +4,84 @@ This repository ships an environment-variable driven Docker Compose setup.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Pull pre-built image (Recommended)
|
||||
|
||||
```bash
|
||||
docker compose up -d --build hermes-agent hermes-webui
|
||||
WEBUI_IMAGE=ekkoye8888/hermes-web-ui:latest docker compose up -d hermes-agent hermes-webui
|
||||
docker compose logs -f hermes-webui
|
||||
```
|
||||
|
||||
Open: `http://localhost:6060`
|
||||
|
||||
### Build from source
|
||||
|
||||
```bash
|
||||
docker compose up -d --build hermes-agent hermes-webui
|
||||
docker compose logs -f hermes-webui
|
||||
```
|
||||
|
||||
## Services
|
||||
|
||||
This compose file runs two services:
|
||||
|
||||
- `hermes-agent` — Hermes Agent runtime (image: `nousresearch/hermes-agent`)
|
||||
- `hermes-webui` — Web UI dashboard (pre-built image or built from source)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
All key runtime settings are configured from compose variables.
|
||||
This compose file runs two services together:
|
||||
|
||||
- `hermes-agent` (image: `nousresearch/hermes-agent`)
|
||||
- `hermes-webui` (built from this repository)
|
||||
| Variable | Default | Description |
|
||||
|---|---|---|
|
||||
| `PORT` | `6060` | Web UI listen port |
|
||||
| `UPSTREAM` | `http://hermes-agent:8642` | Hermes gateway URL (container internal) |
|
||||
| `HERMES_BIN` | `/opt/hermes/.venv/bin/hermes` | Path to Hermes CLI binary |
|
||||
| `HERMES_AGENT_IMAGE` | `nousresearch/hermes-agent:latest` | Hermes Agent base image |
|
||||
| `WEBUI_IMAGE` | `hermes-web-ui-local:latest` | Web UI image (set to `ekkoye8888/hermes-web-ui:latest` to use pre-built) |
|
||||
| `HERMES_DATA_DIR` | `./hermes_data` | Hermes runtime data directory |
|
||||
| `AUTH_DISABLED` | `false` | Set to `true` to disable login authentication |
|
||||
|
||||
Compose mapping highlights:
|
||||
|
||||
- Host/browser port: `${PORT}:${PORT}`
|
||||
- Server `PORT` is set from `${PORT}`
|
||||
- Upstream is set from `${UPSTREAM}`
|
||||
- Hermes CLI binary is set from `${HERMES_BIN}`
|
||||
- Hermes base image is set from `${HERMES_AGENT_IMAGE}` (used by both `hermes-agent` and webui build base)
|
||||
|
||||
Override variables directly from shell when running compose:
|
||||
Override variables directly from shell:
|
||||
|
||||
```bash
|
||||
PORT=16060 \
|
||||
UPSTREAM=http://127.0.0.1:8642 \
|
||||
HERMES_BIN=/opt/hermes/.venv/bin/hermes \
|
||||
docker compose up -d --build hermes-agent hermes-webui
|
||||
AUTH_DISABLED=true \
|
||||
docker compose up -d hermes-agent hermes-webui
|
||||
```
|
||||
|
||||
Or create a `.env` file in the project root:
|
||||
|
||||
```
|
||||
WEBUI_IMAGE=ekkoye8888/hermes-web-ui:latest
|
||||
PORT=6060
|
||||
AUTH_DISABLED=false
|
||||
```
|
||||
|
||||
## Data Persistence
|
||||
|
||||
- Hermes runtime data persists in `${HERMES_DATA_DIR}`.
|
||||
- Default path is `./hermes_data`.
|
||||
| Path | Description |
|
||||
|---|---|
|
||||
| `${HERMES_DATA_DIR}` (`./hermes_data`) | Hermes runtime data (sessions, config, profiles) |
|
||||
| `${HERMES_DATA_DIR}/hermes-web-ui-data` | Web UI data (auth token) |
|
||||
|
||||
- Hermes data persists in `./hermes_data`, mapped to `/home/agent/.hermes` in the container.
|
||||
- Web UI auth token persists in `./hermes_data/hermes-web-ui-data/.token`.
|
||||
- When `AUTH_DISABLED=false`, the token is auto-generated on first run and printed to container logs.
|
||||
- Deleting the token file and restarting will generate a new one.
|
||||
|
||||
## Port Mapping
|
||||
|
||||
| Port | Service | Description |
|
||||
|---|---|---|
|
||||
| `${PORT}` (6060) | hermes-webui | Web UI dashboard |
|
||||
| 8642-8670 | hermes-agent | Hermes Agent gateway ports (for multi-profile) |
|
||||
|
||||
## Code Runtime Behavior
|
||||
|
||||
- Server upstream comes from `UPSTREAM` env (`packages/server/src/config.ts`).
|
||||
- Hermes CLI binary comes from `HERMES_BIN` env (`packages/server/src/services/hermes-cli.ts`).
|
||||
- If `HERMES_BIN` is not provided, code falls back to `hermes` in `PATH`.
|
||||
- Profile switching dynamically resolves upstream URLs via `GatewayManager` — the `UPSTREAM` env only sets the default profile gateway.
|
||||
|
||||
## Common Operations
|
||||
|
||||
@@ -55,6 +91,14 @@ Recreate webui:
|
||||
docker compose up -d --no-deps --force-recreate hermes-webui
|
||||
```
|
||||
|
||||
View auth token:
|
||||
|
||||
```bash
|
||||
docker compose logs hermes-webui | grep token
|
||||
# or
|
||||
cat ./hermes_data/hermes-web-ui-data/.token
|
||||
```
|
||||
|
||||
Stop:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user