aplicada la misma idea a todos los servicios
All checks were successful
Deploy conversation layer / deploy (push) Successful in 22s
All checks were successful
Deploy conversation layer / deploy (push) Successful in 22s
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
FROM node:18-alpine
|
||||
# ---------- Etapa de build ----------
|
||||
FROM node:18-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install --production
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ---------- Etapa ligera para producción ----------
|
||||
FROM node:18-alpine
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
|
||||
EXPOSE 3001
|
||||
CMD ["node","dist/index.js"]
|
||||
CMD ["node", "dist/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user