include dockerfile

This commit is contained in:
2025-08-25 14:57:08 +02:00
parent 9e3e9c5bd9
commit 5d018c4c5c
5 changed files with 27 additions and 2 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
# Etapa 1: build
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Etapa 2: producción
FROM node:22-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/package*.json ./
RUN npm install --omit=dev
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]