Update Dockerfile

This commit is contained in:
Mathias Wagner
2024-07-22 19:06:02 +02:00
parent 1e484a24d6
commit b27a360e55

View File

@ -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"]
CMD ["node", "dist/server.js"]