mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Switch to Bun instead of Deno (or Yarn) for faster web app builds
This commit is contained in:
@@ -35,17 +35,17 @@ RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.tom
|
||||
pip install --no-cache-dir .
|
||||
|
||||
# Build Web App
|
||||
FROM node:23-alpine AS web-app
|
||||
FROM oven/bun:1-alpine AS web-app
|
||||
# Set build optimization env vars
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
WORKDIR /app/src/interface/web
|
||||
# Install dependencies first (cache layer)
|
||||
COPY src/interface/web/package.json src/interface/web/yarn.lock ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
COPY src/interface/web/package.json src/interface/web/bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
# Copy source and build
|
||||
COPY src/interface/web/. ./
|
||||
RUN yarn build
|
||||
RUN bun run build
|
||||
|
||||
# Merge the Server and Web App into a Single Image
|
||||
FROM base
|
||||
|
||||
Reference in New Issue
Block a user