changed ports for docker file and added build and production stage

This commit is contained in:
2025-07-25 12:45:39 +02:00
parent e1ac9db05c
commit 1db7b9da80
2 changed files with 16 additions and 14 deletions

View File

@@ -1,12 +1,13 @@
FROM node:20-alpine
# Build Stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production Stage
FROM nginx:stable-alpine AS production
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 5001
CMD ["npm", "start"]
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,12 +1,13 @@
FROM node:20-alpine
# Build Stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production Stage
FROM nginx:stable-alpine AS production
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 5003
CMD ["npm", "start"]
CMD ["nginx", "-g", "daemon off;"]