!21 优化代码

Merge pull request !21 from OceansDeep/dev-gl
This commit is contained in:
OceansDeep
2022-06-16 01:24:18 +00:00
committed by Gitee
9 changed files with 58 additions and 28 deletions

View File

@@ -1,8 +1,13 @@
FROM nginx:alpine
FROM node:10.19.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN mkdir -p /app/
COPY ./dist /app/
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]k