Add Dockerfile
This commit is contained in:
+13
@@ -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"]
|
||||
Reference in New Issue
Block a user