diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0486c75 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.github +.agents +.codex +node_modules +docs/.vitepress/dist +docs/.vitepress/cache +_test_* +docs/public/hands-on-win.zip +docs/public/hands-on-mac.zip + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5bbf94e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:20-alpine AS build + +WORKDIR /app + +RUN corepack enable && corepack prepare pnpm@9.15.9 --activate + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +COPY . . +RUN pnpm docs:build + +FROM nginx:1.27-alpine + +COPY --from=build /app/docs/.vitepress/dist /usr/share/nginx/html + +EXPOSE 80 + diff --git a/package.json b/package.json index 877ac7c..d4fc363 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "private": true, "version": "1.0.0", "type": "module", + "packageManager": "pnpm@9.15.9", "description": "Digi Agent Builder 3.0 智能体开发示例指导书 Web 版", "scripts": { "docs:dev": "vitepress dev docs",