add docker support

This commit is contained in:
AceDataCloud committed 2021-08-28 00:31:39 +08:00
1 parent 504097d407
commit 94ab7ebe17
5 files changed
+21 -8

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN yarn
COPY . .
RUN yarn build
# 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;"]