Files
hossein-por-shop/frontend/dockerfile
T
2025-11-10 21:56:13 +03:30

18 lines
418 B
Docker

FROM oven/bun:1 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 . .
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"]