From 78d0b82c1492fcbde36cb26b4f45f177e30856a4 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Fri, 24 Oct 2025 13:38:02 +0330 Subject: [PATCH] use bun insted of npm --- frontend/dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/dockerfile b/frontend/dockerfile index 72f8fd6..0dc0cbd 100644 --- a/frontend/dockerfile +++ b/frontend/dockerfile @@ -1,13 +1,16 @@ -FROM node:20-alpine as build-stage +FROM oven/bun:1 AS build-stage WORKDIR /app -COPY package*.json ./ -RUN npm install --force -COPY . . -RUN npm run build -FROM node:20-alpine as production-stage +# Limit memory for Node processes (3 GB) + +COPY package.json bun.lockb* ./ +RUN bun install --frozen-lockfile +COPY . . +RUN bun run build + +FROM oven/bun:1 AS production-stage WORKDIR /app COPY --from=build-stage /app /app EXPOSE 3000 ENV NODE_ENV=production -CMD ["npm", "run", "start"] +CMD ["bun", "run", "start"] \ No newline at end of file