Skip to content

Commit 511691d

Browse files
authored
Create Dockerfile
1 parent 341c2f5 commit 511691d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

react-client/src/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Use Node.js to build the React app
2+
FROM node:18 AS build
3+
WORKDIR /app
4+
COPY package.json yarn.lock ./
5+
RUN yarn install
6+
COPY . .
7+
RUN yarn build
8+
9+
# Serve the build using a lightweight web server
10+
FROM nginx:stable-alpine
11+
COPY --from=build /app/build /usr/share/nginx/html
12+
EXPOSE 80
13+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)