feat: app功能基本实现
This commit is contained in:
+11
-8
@@ -1,20 +1,23 @@
|
||||
FROM node:16-alpine as build-stage
|
||||
FROM node:22-alpine AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@7.32.1 --activate
|
||||
RUN corepack prepare pnpm@11.1.3 --activate
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
COPY .npmrc package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.base.json ./
|
||||
COPY web/package.json web/package.json
|
||||
RUN pnpm install --frozen-lockfile --filter @simple-template/web...
|
||||
|
||||
COPY . .
|
||||
COPY web web
|
||||
WORKDIR /app/web
|
||||
RUN pnpm build
|
||||
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
FROM nginx:stable-alpine AS production-stage
|
||||
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY --from=build-stage /app/web/dist /usr/share/nginx/html
|
||||
COPY web/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user