Skip to content

Commit

Permalink
Debugging...One more try without nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
wobla committed Jul 17, 2024
1 parent ad22670 commit 56a5c3a
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 56a5c3a

Please sign in to comment.