update docker file

This commit is contained in:
Parsa Nazer
2025-11-10 22:03:32 +03:30
parent 23968154c9
commit 6441b8be8b
+6 -7
View File
@@ -1,15 +1,14 @@
FROM oven/bun:1 AS build-stage
# Build stage — use Node to correctly install native deps
FROM node:22-alpine AS build-stage
WORKDIR /app
# Allow native module installs (sharp needs this)
ENV BUN_CONFIG_NO_NATIVE_INSTALLS=0
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile && bun add sharp --platform=linux --arch=x64
COPY package*.json ./
RUN npm ci --os=linux --cpu=x64
COPY . .
RUN bun run build
RUN npm run build
# Run stage — use Bun for serving
FROM oven/bun:1 AS production-stage
WORKDIR /app
COPY --from=build-stage /app /app