FROM oven/bun:latest AS builder

WORKDIR /app

COPY package.json .

RUN bun install

COPY . .

RUN bun run ci-build:dist

FROM oven/bun:latest AS runner

WORKDIR /app

COPY --from=builder /app/dist .

CMD ["bun", "run", "src/index.ts"]