-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debugging...One more try without nginx
- Loading branch information
Showing
1 changed file
with
6 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |