From b27a360e55072e65e11d7d15bd25411a54f45ef0 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Mon, 22 Jul 2024 19:06:02 +0200 Subject: [PATCH] Update Dockerfile --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce68e6a..b98f0a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ FROM node:20 AS build WORKDIR /usr/src/app COPY package.json . -RUN npm install && npm install typescript -g +COPY yarn.lock . +RUN yarn install --development COPY . . -RUN npm run build +RUN yarn run build FROM node:20-alpine WORKDIR /usr/src/app COPY package.json . -RUN npm install --production +RUN yarn install --production COPY --from=build /usr/src/app/dist dist +COPY --from=build /usr/src/app/build build EXPOSE 8025 -CMD ["npm", "run", "start"] \ No newline at end of file +CMD ["node", "dist/server.js"] \ No newline at end of file