File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM oven/bun:alpine AS builder
1+ FROM oven/bun:alpine AS build
22WORKDIR /app
33
44RUN apk add --no-cache openssl
@@ -10,18 +10,11 @@ COPY . .
1010RUN DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder" bunx prisma generate
1111RUN bun run build
1212
13- FROM alpine:3.19
13+ FROM gcr.io/distroless/nodejs22-debian12 AS runtime
1414WORKDIR /app
1515
16- RUN apk add --no-cache nodejs=~20 npm && \
17- npm install -g prisma@latest --omit=dev && \
18- rm -rf /var/cache/apk/* /tmp/* /var/tmp/* ~/.npm
16+ EXPOSE 3000
1917
20- COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client
21- COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
22- COPY --from=builder /app/prisma ./prisma
23- COPY --from=builder /app/.output ./.output
18+ COPY --from=build /app /app
2419
25- USER nobody
26- EXPOSE 3000
27- CMD ["sh" , "-c" , "prisma migrate deploy && node ./.output/server/index.mjs" ]
20+ CMD [ ".output/server/index.mjs" ]
You can’t perform that action at this time.
0 commit comments