Skip to content

Commit

Permalink
dockerfile for fe
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Sep 29, 2024
1 parent c518cba commit e615e13
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stage 1: Build the react app
FROM node:16 AS build
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Stage 2: Serve the built app
FROM nginx:alpine
COPY --from=build /usr/src/app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit e615e13

Please sign in to comment.