FROM oven/bun:1.4 AS build WORKDIR /app COPY package.json bun.lock* ./ RUN bun install COPY . . RUN bun --bun vite build FROM oven/bun:1.4 AS runtime WORKDIR /app RUN apt-get update \ && apt-get install -y --no-install-recommends ffmpeg \ && rm -rf /var/lib/apt/lists/* COPY package.json bun.lock* ./ RUN bun install --production --ignore-scripts COPY --from=build /app/build ./build ENV NODE_ENV=production ENV PORT=3000 EXPOSE 3000 USER bun CMD ["bun", "./build/index.js"]