diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..93f1361 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..2ca0b18 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,22 @@ +## Build React App ## + +FROM node:14.15.4-buster as builder + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install --silent + +RUN npm install react-scripts -g --silent + +COPY . . + +RUN npm run build + +## Run w/ Nginx ## +FROM nginx:alpine + +COPY --from=builder /app/build /usr/share/nginx/html + +EXPOSE 80