Files
jiawei 348a459893
my-v0 / deploy (push) Successful in 24s
feat: 更新健康检查和 Nginx 配置
2026-08-17 00:36:53 +08:00

21 lines
441 B
Docker

FROM my-v0-base:latest AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 3000
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q --spider http://127.0.0.1:3000/ || exit 1
CMD ["nginx", "-g", "daemon off;"]