Files
psp_panel/Dockerfile
T

34 lines
546 B
Docker
Raw Normal View History

2026-03-30 13:17:34 +03:30
# Build stage
2026-04-06 13:31:30 +03:30
FROM node:20 AS builder
2026-03-30 13:17:34 +03:30
ARG TENANT=tis
ARG DIST_DIR=tis
2026-03-30 13:17:34 +03:30
WORKDIR /app
2026-04-23 01:22:44 +03:30
# RUN npm config set registry "https://hub.megan.ir/npm/"
2026-03-30 13:17:34 +03:30
2026-04-06 13:31:30 +03:30
RUN npm install -g pnpm
2026-03-30 13:17:34 +03:30
COPY package.json pnpm-lock.yaml ./
2026-04-06 13:31:30 +03:30
RUN pnpm install
2026-03-30 13:17:34 +03:30
COPY . .
RUN if [ "$TENANT" = "default" ]; then \
pnpm run build; \
else \
pnpm run build:$TENANT; \
fi
2026-03-30 13:17:34 +03:30
FROM nginx:alpine
ARG DIST_DIR=tis
2026-03-30 13:17:34 +03:30
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/dist/${DIST_DIR}/browser /usr/share/nginx/html
2026-03-30 13:17:34 +03:30
EXPOSE 5000
2026-03-30 13:17:34 +03:30
CMD ["nginx", "-g", "daemon off;"]