From 56a5c3a88360c2efcd4e4f99954a6fa5aea69d7e Mon Sep 17 00:00:00 2001 From: Romanas Date: Wed, 17 Jul 2024 22:38:46 +0300 Subject: [PATCH] Debugging...One more try without nginx --- frontend/Dockerfile | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 0362063..4e54edf 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,25 +1,12 @@ -# Stage 1: Build the React app -FROM node:21 as build +FROM node:21-alpine -RUN ls -la -COPY ./package.json ./app -COPY ./package-lock.json ./app - -WORKDIR /app +WORKDIR /app/ +COPY public/ /app/public +COPY src/ /app/src +COPY package.json /app/ RUN npm install -COPY ./frontend . - -RUN ls -la - -RUN npm run build - -# Stage 2: Serve the React app with Nginx -FROM nginx:alpine - -COPY --from=build /app/build /usr/share/nginx/html - EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +CMD ["npm", "start"]