| 123456789101112131415161718192021222324252627 |
- FROM node:22-alpine
- WORKDIR /opt/maxkb-app/ui
- COPY ui/package.json ./
- RUN npm config set registry https://registry.npmmirror.com && \
- npm install
- COPY ui/ ./
- ENV NODE_OPTIONS="--max-old-space-size=4096"
- RUN npm run build-only -- --mode admin && \
- mv dist dist_admin && \
- npm run build-only-chat -- --mode chat && \
- cp -r dist_admin/* dist/ && \
- rm -rf dist_admin
- FROM nginx:alpine
- COPY --from=0 /opt/maxkb-app/ui/dist /usr/share/nginx/html
- COPY ui/nginx.conf /etc/nginx/conf.d/default.conf
- EXPOSE 80
- CMD ["nginx", "-g", "daemon off;"]
|