Create backend Dockerfile

This commit is contained in:
Mathias Wagner
2024-07-20 12:29:51 +02:00
parent d4f39b362b
commit 64eda026c2

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:20 AS build
WORKDIR /usr/src/app
COPY package.json .
RUN npm install && npm install typescript -g
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /usr/src/app
COPY package.json .
RUN npm install --production
COPY --from=build /usr/src/app/dist dist
EXPOSE 8025
CMD ["npm", "run", "start"]