diff --git a/Dockerfile b/Dockerfile index b688e46..1f45cb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.7 -FROM oven/bun:1.3.13 AS deps +FROM oven/bun:canary-slim AS deps WORKDIR /app COPY package.json bun.lock ./ @@ -15,7 +15,7 @@ COPY src ./src COPY .opencode ./.opencode RUN bun run check -FROM oven/bun:1.3.13 AS runner +FROM oven/bun:canary-slim AS runner WORKDIR /app ENV NODE_ENV=production diff --git a/README.md b/README.md index 1966028..709278b 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,27 @@ bun install bun run start:prod ``` +### Docker Compose 启动 + +项目根目录已提供 `Dockerfile` 和 `docker-compose.yml`,可直接使用: + +```bash +cd TJWaterAgent +docker compose up -d --build +``` + +查看日志: + +```bash +docker compose logs -f tjwater-agent +``` + +停止并清理容器: + +```bash +docker compose down +``` + ### 常用脚本 | 命令 | 作用 | diff --git a/opencode.json b/opencode.json index c0f1181..9610dcd 100644 --- a/opencode.json +++ b/opencode.json @@ -13,4 +13,4 @@ "port": 4096 }, "default_agent": "agent" -} +} \ No newline at end of file