mirror of https://github.com/halo-dev/halo-admin
parent
b7d200f12b
commit
d2c5998b5e
@ -0,0 +1,19 @@
|
||||
# build stage
|
||||
FROM node:lts-alpine as build-stage
|
||||
ENV PNPM_VERSION 7.5.0
|
||||
RUN apk --no-cache add curl
|
||||
RUN curl -sL https://unpkg.com/@pnpm/self-installer | node
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pnpm install
|
||||
RUN pnpm build:packages
|
||||
RUN pnpm build
|
||||
RUN pnpm store prune
|
||||
RUN rm -rf ~/.pnpm-store
|
||||
|
||||
# production stage
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
Loading…
Reference in new issue