Skip to content

Commit

Permalink
Trying another setup for Dockerfile, because the build broke with the…
Browse files Browse the repository at this point in the history
… old one
  • Loading branch information
SevLG committed Dec 22, 2023
1 parent bf8ecee commit f1a68e9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM node:21-alpine

WORKDIR /react-app/

COPY /react-app/ /react-app/

FROM node:21-alpine AS development
ENV NODE_ENV development
# Add a work directory
WORKDIR /app
# Cache and Install dependencies
COPY ./react-app/package.json .
COPY ./react-app/package-lock.json .
RUN npm install

CMD ["npm", "start"]
# Copy app files
COPY ./react-app/ .
# Expose port
EXPOSE 3000
# Start the app
CMD [ "npm", "start" ]

0 comments on commit f1a68e9

Please sign in to comment.