Skip to content

Commit

Permalink
Update - docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
0147123 committed Aug 6, 2024
1 parent 925f9f5 commit 5c76d2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM node:14-alpine
WORKDIR /app
FROM node:20-alpine3.19
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install

COPY . .
ENV PORT=3001
RUN npm run build
EXPOSE 3001
CMD ["npm", "start"]

# Expose the port the app runs on
EXPOSE 3002

# Command to run your application
CMD ["npm", "run", "start-diff-port"]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"scripts": {
"start": "react-scripts start",
"start-diff-port": "PORT=3002 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand Down

0 comments on commit 5c76d2b

Please sign in to comment.