use bun insted of npm

This commit is contained in:
Parsa Nazer
2025-10-24 13:38:02 +03:30
parent 4c76ca6807
commit 78d0b82c14
+10 -7
View File
@@ -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"]