Files
hossein-por-shop/frontend/dockerfile
T
2025-11-10 22:03:32 +03:30

17 lines
374 B
Docker

# Build stage — use Node to correctly install native deps
FROM node:22-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci --os=linux --cpu=x64
COPY . .
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
EXPOSE 3000
ENV NODE_ENV=production
CMD ["bun", "run", "start"]