move to bun

This commit is contained in:
2024-01-27 01:26:52 +01:00
parent 7bc3c990e0
commit ee25d7db59
8 changed files with 19 additions and 332 deletions

View File

@@ -1,19 +1,11 @@
FROM node:18.15-alpine as base
RUN npm -g install pnpm@7
FROM oven/bun:1 as base
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
FROM base as build
RUN pnpm install --frozen-lockfile
FROM base as builder
COPY . .
RUN pnpm run build
FROM base as runner
RUN pnpm install --frozen-lockfile --prod
COPY --from=build /app/dist /app/dist
CMD ["pnpm", "run", "start"]
RUN bun install --production --frozen-lockfile
RUN bun build --target bun --minify src/index.ts --outfile app.js
FROM base
COPY --from=builder /app/app.js .
ENTRYPOINT [ "bun", "run", "app.js" ]