docker bushu
Deploy Guidebook to GitHub Pages / build (push) Canceled after 0s
Deploy Guidebook to GitHub Pages / deploy (push) Canceled after 0s

This commit is contained in:
2026-10-17 01:33:04 +08:00
parent 36a5dc7589
commit d441430d0f
3 changed files with 39 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
.git
.github
.agents
.codex
node_modules
docs/.vitepress/dist
docs/.vitepress/cache
_test_*
+20
View File
@@ -0,0 +1,20 @@
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 nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/docs/.vitepress/dist /usr/share/nginx/html
EXPOSE 8005
CMD ["nginx", "-g", "daemon off;"]
+11
View File
@@ -0,0 +1,11 @@
server {
listen 8005;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}