From e5d780efce6e6fbfdf985ee9192d246192e65dde Mon Sep 17 00:00:00 2001 From: Huarch Date: Thu, 30 Apr 2026 15:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile=20=E5=92=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20docker-compose.yml=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- README.md | 21 +++++++++++++++++++++ opencode.json | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) 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