Dockerize the app

This commit is contained in:
Gardner Bickford
2022-06-18 13:18:48 +12:00
parent 17a27a138b
commit a9c051b743
17 changed files with 224 additions and 53 deletions
+16
View File
@@ -0,0 +1,16 @@
# Production image for React app
FROM node:18-alpine AS builder
WORKDIR /home/node
VOLUME /home/node/node_modules
COPY . .
RUN npm i -g npm@latest \
&& npm ci --legacy-peer-deps \
&& npm run build
FROM nginx:alpine
COPY --from=builder /home/node/build /usr/share/nginx/html