chore: 初始化提交

This commit is contained in:
tongtong committed 2026-09-21 13:01:45 +08:00
commit 943c0a0e5a
71 files changed
+7122

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# 构建前端静态产物
FROM node:22-alpine AS web-build
RUN corepack enable
WORKDIR /app
COPY web/package.json web/pnpm-lock.yaml* ./
RUN pnpm install --no-frozen-lockfile
COPY web ./
RUN pnpm build
# 运行镜像:nginx 托管静态资源并反代 /api
FROM nginx:1.27-alpine
COPY --from=web-build /app/dist /usr/share/nginx/html
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD wget -qO- http://127.0.0.1:3000/ >/dev/null || exit 1