Some checks failed
Deploy NestJS API / build-and-push (push) Failing after 54s
18 lines
359 B
Docker
18 lines
359 B
Docker
# Estágio 1: Build
|
|
FROM node:18-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Estágio 2: Produção
|
|
FROM node:18-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/package*.json ./
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
EXPOSE 3000
|
|
CMD ["node", "dist/main"]
|