FROM oven/bun:1 AS base
WORKDIR /app

FROM base AS build

COPY bun.lock .
COPY package.json .
RUN bun install --frozen-lockfile

COPY . .
RUN bun run build

FROM base AS product
COPY --from=build /app/build /app
ENTRYPOINT [ "bun", "run", "index.js" ]

