Dockerize the app
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user