Skip to content

Commit

Permalink
fix: 调整Dockderfile
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Sep 19, 2023
1 parent 45b485b commit 9777fed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
20 changes: 14 additions & 6 deletions vben28/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
FROM nginx:1.17.3-alpine as base
EXPOSE 80
FROM node:16-alpine as build-stage
WORKDIR /app
COPY . ./
ENV NODE_OPTIONS=--max-old-space-size=16384
RUN npm install pnpm -g
RUN pnpm i
RUN npm run build


COPY /_nginx/nginx.conf /etc/nginx/nginx.conf
COPY /_nginx/env.js /etc/nginx/env.js
COPY /_nginx/default.conf /etc/nginx/conf.d/default.conf
COPY /dist/ /usr/share/nginx/html
FROM nginx:1.17.3-alpine as production-stage
COPY --from=build-stage app/_nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=build-stage app/_nginx/env.js /etc/nginx/env.js
COPY --from=build-stage app/_nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage app/dist/ /usr/share/nginx/html
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
18 changes: 0 additions & 18 deletions vben28/Dockerfile.ci

This file was deleted.

0 comments on commit 9777fed

Please sign in to comment.