changed ports for docker file and added build and production stage
This commit is contained in:
@@ -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;"]
|
||||
|
@@ -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;"]
|
||||
|
Reference in New Issue
Block a user