# ---- مرحله ساخت ---- FROM node:22-alpine AS build WORKDIR /app # NPM_REGISTRY overridable like the ERP frontend image; npmmirror default # because registry.npmjs.org is unreachable from this network. ARG NPM_REGISTRY=https://registry.npmmirror.com COPY package.json package-lock.json ./ RUN npm config set registry ${NPM_REGISTRY} && npm ci COPY . . RUN npm run build # ---- مرحله اجرا ---- FROM nginx:alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]