Added Dockerfile for API and Web apps

This commit is contained in:
2023-03-29 22:56:42 -05:00
parent 9b590bb4fa
commit 0ca2a0e38c
3 changed files with 21 additions and 3 deletions

13
Web/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# https://www.knowledgehut.com/blog/web-development/how-to-dockerize-react-app
FROM node:17-alpine as builder
WORKDIR /app
COPY package-lock.json .
RUN npm install
COPY . .
RUN npm build
FROM nginx:latest
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /app/build .
ENTRYPOINT ["nginx", "-g", "daemon off;"]