fix: switch Dockerfile to bun and copy bun.lock

Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
This commit is contained in:
Jiří Stachandaider committed 2026-10-12 21:59:40 +02:00
1 parent f0ad8481c4
commit 0bd901e890
1 file changed
+7 -5
+7 -5
View File
@@ -6,8 +6,9 @@ FROM node:22-alpine AS builder
WORKDIR /app
# Install dependencies first (layer caching)
COPY package.json ./
RUN npm install
COPY package.json bun.lock ./
RUN npm install -g bun
RUN bun install
# Copy application source code
COPY . .
@@ -17,7 +18,7 @@ ARG VITE_GOOGLE_MAPS_API_KEY=""
ENV VITE_GOOGLE_MAPS_API_KEY=$VITE_GOOGLE_MAPS_API_KEY
# Build production bundle (Vite client + server.cjs)
RUN npm run build
RUN bun run build
# ========================================================
# Stage 2: Serve full-stack application (API + SPA) with Node.js
@@ -29,8 +30,9 @@ ENV NODE_ENV=production
ENV PORT=3000
# Install production dependencies only
COPY package.json ./
RUN npm install --omit=dev && npm cache clean --force
COPY package.json bun.lock ./
RUN npm install -g bun
RUN bun install --production
# Copy built bundle from builder stage
COPY --from=builder /app/dist ./dist