Add Dockerfile

This commit is contained in:
2024-07-31 16:10:12 +02:00
parent 540a34f211
commit 9d8c536ffa
+13
View File
@@ -0,0 +1,13 @@
FROM node:lts-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npx nest build
# étape de production
FROM node:lts-alpine AS production-stage
COPY --from=build-stage /app/dist/ /app
COPY --from=build-stage /app/node_modules/ /app/node_modules
EXPOSE 8765
CMD ["node", "main"]