21 lines
426 B
Docker
21 lines
426 B
Docker
FROM node:20.15.1-alpine as builder
|
|
|
|
WORKDIR /app/builder
|
|
|
|
COPY . .
|
|
|
|
RUN npm install \
|
|
&& npm run build
|
|
|
|
FROM node:20.15.1-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/builder/node_modules ./node_modules
|
|
COPY --from=builder /app/builder/prisma ./prisma
|
|
COPY --from=builder /app/builder/dist .
|
|
COPY --from=builder /app/builder/docker-entrypoint.sh .
|
|
|
|
ENTRYPOINT [ "./docker-entrypoint.sh" ]
|
|
|
|
CMD [ "node", "./src/main.js" ] |