📦 build: run TypeScript directly with Bun, drop the tsc build step

This commit is contained in:
2026-07-13 16:59:54 +07:00
parent e6c4bc0ccd
commit be0fb27db7
8 changed files with 67 additions and 23 deletions
+4 -13
View File
@@ -1,14 +1,4 @@
FROM oven/bun:1 AS build
WORKDIR /home/bun/app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY tsconfig.json ./
COPY src ./src
RUN bun run build
FROM oven/bun:1-slim
FROM oven/bun:1.2-slim
WORKDIR /home/bun/app
RUN apt-get update -y && \
@@ -18,6 +8,7 @@ RUN apt-get update -y && \
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production
COPY --from=build /home/bun/app/dist ./dist
COPY tsconfig.json ./
COPY src ./src
CMD ["bun", "dist/index.js"]
CMD ["bun", "src/index.ts"]