|
|
@@ -9,7 +9,7 @@ Containerized deployment of the [DeepSeek Harness](https://github.com/deepseek-a
|
|
|
## Features
|
|
|
|
|
|
- Self-contained single container: dsh (loopback only, inside the container) + Caddy pure reverse proxy (Host/Origin rewritten to loopback for the dsh anti-DNS-rebinding fence)
|
|
|
-- **Authentication since dsh 0.2.2-rc.1**: moved into dsh itself. On first start, dsh prints a one-time `?token=…` URL; the browser exchanges it for a persistent cookie (survives restarts). Caddy basic auth was removed in 0.2.2-rc.1+ (would have intercepted the browser's first redirect and hidden the token URL)
|
|
|
+- **Authentication since dsh 0.2.2-rc.5**: moved into dsh itself. On first start, dsh prints a one-time `?token=…` URL; the browser exchanges it for a persistent cookie (survives restarts). Caddy basic auth was removed in 0.2.2-rc.5+ (would have intercepted the browser's first redirect and hidden the token URL)
|
|
|
- Configuration and project/session data persisted: bind mount `./data` → `/home/node` (the whole HOME: settings.yaml, API Key, profiles, sessions, storages, plus agent-installed tools under `~/.x-cmd.root`)
|
|
|
- Runs as non-root (uid 1000); dsh is not exposed directly
|
|
|
- Built-in health check: `docker compose ps` shows the real service health (`starting`/`healthy`/`unhealthy`), exchanging the one-time token for a cookie and probing dsh
|
|
|
@@ -30,14 +30,14 @@ cp .env.example .env # edit DEEPSEEK_API_KEY (DSH_AUTH_USER/PASSWORD are now
|
|
|
docker compose up -d # pull the latest image and start
|
|
|
```
|
|
|
|
|
|
-> ⚠️ **升级警告 — 升级到含 dsh 0.2.2-rc.1+ 鉴权迁移的版本时,必须先 `git pull` 同步 `docker-compose.yml` / `Caddyfile` / `entrypoint.sh` / `entrypoint.sh 内的 token 抓取后台任务`,仅 `docker compose pull` 拉新 image 配旧 compose 文件会导致 healthcheck 永远 unhealthy 且 web 服务裸奔 (无鉴权)。** 具体见 PR #7 的 commit message 与 DESIGN.md §10 的版本演进记录。
|
|
|
+> ⚠️ **升级警告 — 升级到含 dsh 0.2.2-rc.5+ 鉴权迁移的版本时,必须先 `git pull` 同步 `docker-compose.yml` / `Caddyfile` / `entrypoint.sh` / `entrypoint.sh 内的 token 抓取后台任务`,仅 `docker compose pull` 拉新 image 配旧 compose 文件会导致 healthcheck 永远 unhealthy 且 web 服务裸奔 (无鉴权)。** 具体见 PR #7 的 commit message 与 DESIGN.md §10 的版本演进记录。
|
|
|
|
|
|
### Option 2: Build locally
|
|
|
|
|
|
```bash
|
|
|
docker compose up -d --build
|
|
|
# or pin a dsh version:
|
|
|
-docker build --build-arg DSH_VERSION=0.2.2-rc.1 -t dsh-web:latest .
|
|
|
+docker build --build-arg DSH_VERSION=0.2.2-rc.5 -t dsh-web:latest .
|
|
|
```
|
|
|
|
|
|
After startup, **read the one-time launch URL** with one of:
|
|
|
@@ -56,8 +56,8 @@ Then open the printed URL (e.g. `http://<host>:3080/?token=…`) in a browser. T
|
|
|
|
|
|
| Variable | Required | Default | Description |
|
|
|
| --- | --- | --- | --- |
|
|
|
-| `DSH_AUTH_USER` | No (since 0.2.2-rc.1) | `admin` | Was: Basic Auth username. Now kept only for rollback to ≤0.1.1 series; ignored on 0.2.2-rc.1+ |
|
|
|
-| `DSH_AUTH_PASSWORD` | No (since 0.2.2-rc.1) | None | Was: Basic Auth plaintext password (bcrypt hash auto-generated). Now kept only for rollback to ≤0.1.1 series |
|
|
|
+| `DSH_AUTH_USER` | No (since 0.2.2-rc.5) | `admin` | Was: Basic Auth username. Now kept only for rollback to ≤0.1.1 series; ignored on 0.2.2-rc.5+ |
|
|
|
+| `DSH_AUTH_PASSWORD` | No (since 0.2.2-rc.5) | None | Was: Basic Auth plaintext password (bcrypt hash auto-generated). Now kept only for rollback to ≤0.1.1 series |
|
|
|
| `DEEPSEEK_API_KEY` | Yes | None | DeepSeek API Key (referenced by the provider via apiKeyEnv) |
|
|
|
| `DSH_WEB_PORT` | No | `3080` | Host port exposed to the outside (change it when it conflicts with an existing service) |
|
|
|
| `DSH_TRUSTED_HOSTS` | No | Empty | Comma-separated extra trusted hosts, injected into the profile's `cordis.patch.yml` (only when the file is absent or still the empty template; user-maintained files are skipped — edit the file directly); by default Caddy rewrites Host/Origin to loopback, which covers normal access |
|
|
|
@@ -126,7 +126,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends <pkg> \
|
|
|
|
|
|
## Changing the Password / Resetting Auth
|
|
|
|
|
|
-**dsh 0.2.2-rc.1+ (current)**: dsh's persistent cookie is the auth, kept in `./data/.dsh/.credentials.yaml`. To reset after a suspected leak, you **must** rebuild the data volume — `docker compose down -v && docker compose up -d`. The next browser visit uses a new one-time token URL (`docker exec dsh-web cat /home/node/.dsh/web-launch-url.txt`).
|
|
|
+**dsh 0.2.2-rc.5+ (current)**: dsh's persistent cookie is the auth, kept in `./data/.dsh/.credentials.yaml`. To reset after a suspected leak, you **must** rebuild the data volume — `docker compose down -v && docker compose up -d`. The next browser visit uses a new one-time token URL (`docker exec dsh-web cat /home/node/.dsh/web-launch-url.txt`).
|
|
|
|
|
|
> ⚠️ `down -v` is destructive: it also wipes `./data/.dsh/` (settings, profiles, sessions, agent-installed tools under `~/.x-cmd.root`). There is no lighter reset path — the entrypoint's token-extraction background task is one-shot (`grep -m1`), so a single-file `.credentials.yaml` delete plus container restart will NOT refresh the token URL. If you need to preserve session data, take a backup of `./data/.dsh/` before `down -v` and restore specific subpaths afterwards (e.g. `.dsh/profiles/`, `.dsh/AGENTS.md`).
|
|
|
|