Skip to content

Commit

Permalink
bfix: Updates production dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ommanimesh2 authored Feb 17, 2024
1 parent 0b10897 commit c1f1c1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
27 changes: 14 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM node:latest as build
FROM node:18-alpine

WORKDIR /app
WORKDIR /app

COPY package.json package-lock.json ./
# Copy package.json and package-lock.json
COPY package*.json /

RUN npm install
# Install dependencies
RUN npm ci

COPY . ./
# Copy the rest of the code
COPY . .

RUN npm run build
# Build the app
RUN npm run build

# Expose the port the app runs on
EXPOSE 3000

FROM nginx:alpine

COPY --from=build /app/build /usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
# Start the application
CMD ["npm", "run","start"]
2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ services:
- "8081:3000"
volumes:
- .:/app
stdin_open: true
tty: true

0 comments on commit c1f1c1a

Please sign in to comment.