25 lines
398 B
Docker
25 lines
398 B
Docker
# Build stage
|
|
FROM node:20 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# RUN npm config set registry "https://hub.megan.ir/npm/"
|
|
|
|
RUN npm install -g pnpm
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN pnpm install
|
|
|
|
COPY . .
|
|
|
|
RUN pnpm run build
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY --from=builder /app/dist/pos.client/browser /usr/share/nginx/html
|
|
|
|
EXPOSE 4001
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|