Skip to content

Commit

Permalink
Merge pull request #7 from ScilifelabDataCentre/dockerfile_branch
Browse files Browse the repository at this point in the history
Trying another setup for Dockerfile
  • Loading branch information
JanProgrammierung authored Dec 22, 2023
2 parents bf8ecee + f1a68e9 commit 8c0a9aa
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 8c0a9aa

Please sign in to comment.