diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..db4c6d9 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,2 @@ +dist +node_modules \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..8e28771 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,13 @@ +# build stage +FROM node:12 as build-stage +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run 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;"] \ No newline at end of file