Files
hossein-por-shop/frontend/dockerfile
T
marzban-dev 99ccf46698 Updated
2025-11-10 13:22:01 +03:30

20 lines
478 B
Docker

FROM oven/bun:1 AS build-stage
WORKDIR /app
# Limit memory for Node processes (3 GB)
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile
# --- ✅ Rebuild sharp for correct Linux architecture ---
RUN bun x npm rebuild sharp --platform=linux --arch=x64 --target=$(node -v | sed 's/v//')
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 ["bun", "run", "start"]