feat: 修改部署方式

This commit is contained in:
2025-11-18 22:12:11 +08:00
parent fc8e3a8038
commit c4269dc0b9
10 changed files with 239 additions and 25 deletions

21
scripts/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM alpine:3.22 AS base
WORKDIR /app
RUN apk add --no-cache --update nodejs pnpm
FROM base AS install
ENV NODE_ENV=production
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
FROM install AS build
COPY . .
RUN pnpm build
FROM base
COPY --from=install /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD ["node", "./dist/server/entry.mjs"]