update many things

This commit is contained in:
2026-05-04 20:02:10 +03:30
parent 797aecd489
commit ec452bca22
72 changed files with 1375 additions and 606 deletions
+16 -8
View File
@@ -1,16 +1,15 @@
# Build stage
FROM node:20 AS builder
# ---------- Build stage ----------
FROM node:20-alpine AS builder
ARG TENANT=tis
ARG DIST_DIR=tis
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
RUN pnpm install --frozen-lockfile
COPY . .
@@ -20,14 +19,23 @@ RUN if [ "$TENANT" = "default" ]; then \
pnpm run build:$TENANT; \
fi
# ---------- Runtime stage ----------
FROM nginx:alpine
# Remove default config
RUN rm -rf /etc/nginx/conf.d/*
# Copy optimized config
COPY nginx.conf /etc/nginx/conf.d/default.conf
ARG DIST_DIR=tis
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/dist/${DIST_DIR}/browser /usr/share/nginx/html
EXPOSE 5000
# Optional: reduce image size
# RUN apk add --no-cache brotli
EXPOSE 8090
CMD ["nginx", "-g", "daemon off;"]