Skip to content

Commit

Permalink
fix: 调整前端dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Sep 19, 2023
1 parent e721461 commit f193bbc
Show file tree
Hide file tree
Showing 5 changed files with 16,318 additions and 45 deletions.
21 changes: 6 additions & 15 deletions templates/abp-vnext-pro-nuget-all/vben28/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
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 pnpm build


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
FROM nginx:1.17.3-alpine as base
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
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

CMD ["nginx", "-g", "daemon off;"]
21 changes: 6 additions & 15 deletions templates/abp-vnext-pro-nuget-simplify/vben28/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
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 pnpm build


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
FROM nginx:1.17.3-alpine as base
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
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

CMD ["nginx", "-g", "daemon off;"]
21 changes: 6 additions & 15 deletions vben28/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
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 pnpm build


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
FROM nginx:1.17.3-alpine as base
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
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

CMD ["nginx", "-g", "daemon off;"]
18 changes: 18 additions & 0 deletions vben28/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 pnpm build


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;"]

Loading

0 comments on commit f193bbc

Please sign in to comment.