From e615e13c3aa973fde100a2ec9ffae63c80afcbf0 Mon Sep 17 00:00:00 2001 From: djeck1432 Date: Sun, 29 Sep 2024 18:36:22 +0200 Subject: [PATCH] dockerfile for fe --- frontend/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 frontend/Dockerfile diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 00000000..290f478f --- /dev/null +++ b/frontend/Dockerfile @@ -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;"] \ No newline at end of file