# Local Hub UI — React Router SSR server from the published @mesh-tech/hub
# tarball (see Dockerfile.api for the interim-build rationale).
FROM node:22-slim@sha256:6c74791e557ce11fc957704f6d4fe134a7bc8d6f5ca4403205b2966bd488f6b3
WORKDIR /hub/ui
COPY ui/package.json ./package.json
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install --omit=dev --no-audit --no-fund
COPY ui/build ./build
ENV PORT=9000
EXPOSE 9000
CMD ["node", "build/server.js", "./build/server/index.js"]
