FROM oven/bun:1.3.4@sha256:7608db4aeb44f1fe8169cc8ec7055376b3013557b106407ccf092b00e426407d AS bun
FROM node:22.21.1-trixie-slim@sha256:98e1429d1a0b99378b4de43fa385f0746fd6276faf4feeb6104d91f6bad290f9
COPY --from=bun /usr/local/bin/bun \
                /usr/local/bin/bunx \
                /usr/local/bin/
WORKDIR /app
COPY ./ ./
RUN bun install --frozen-lockfile && \
    bun lint:tsc && \
    # bun lint:biome && \
    bun run build && \
    bun clean:cache && \
    bun clean:modules && \
    bun install --frozen-lockfile --production
