Created dockerfile

This commit is contained in:
2023-09-26 23:26:35 +01:00
parent ebf9a21478
commit 0a6ede8125
5 changed files with 285 additions and 1 deletions

20
dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM node:lts-slim as build
WORKDIR /app
COPY package*.json ./
RUN rm -rf node_modules
RUN rm -rf build
COPY . .
RUN npm install
RUN npm run build
FROM node:lts-slim as run
WORKDIR /app
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/build ./build
RUN npm install --production
EXPOSE 3000
ENTRYPOINT [ "npm", "run", "start" ]