👷 添加自动构建发布配置
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-19 17:13:21 +08:00
parent 8012bbec9f
commit af4b947c22
3 changed files with 62 additions and 22 deletions

View File

@@ -1,21 +1,3 @@
FROM node:16-alpine as build-stage
WORKDIR /admim
COPY .npmrc package.json yarn.lock ./
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
yarn install --frozen-lockfile
COPY . .
ARG NODE_ENV=""
RUN env ${NODE_ENV} yarn build:prod
## -- stage: dist => nginx --
FROM nginx:alpine
ENV TZ=Asia/Shanghai
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /admim/dist /usr/share/nginx/html
EXPOSE 80
FROM busybox
LABEL maintainer thomas.hairong@gmail.com
COPY dist /html/