From 6441b8be8b7f7c38d47c0dbd0194149c9808d132 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Mon, 10 Nov 2025 22:03:32 +0330 Subject: [PATCH] update docker file --- frontend/dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/dockerfile b/frontend/dockerfile index 16d9c93..f3ffd85 100644 --- a/frontend/dockerfile +++ b/frontend/dockerfile @@ -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