Finaliza docker compose
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,29 +1,19 @@
|
||||
FROM node:22-alpine AS builder
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY prisma ./prisma/
|
||||
|
||||
RUN yarn install --frozen-lockfile
|
||||
RUN yarn install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npx prisma generate
|
||||
|
||||
RUN yarn build
|
||||
|
||||
FROM node:22-alpine
|
||||
ENV KEYCLOAK_URL=http://keycloak:8080
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY --from=builder /usr/src/app/package.json ./
|
||||
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
||||
|
||||
COPY --from=builder /usr/src/app/dist ./dist
|
||||
COPY --from=builder /usr/src/app/prisma ./prisma
|
||||
RUN npx prisma generate
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user