fix(ui): install prod deps in Docker runtime; add reindex endpoint for chapters_idx

- ui/Dockerfile: copy package-lock.json and run npm ci --omit=dev in the
  runtime stage so marked (and other runtime deps) are available to
  adapter-node at startup — fixes ERR_MODULE_NOT_FOUND for 'marked'
- storage: add ReindexChapters to Store interface and HybridStore — walks
  MinIO objects for a slug, reads chapter titles, upserts chapters_idx
- server: add POST /api/reindex/{slug} to rebuild chapters_idx from MinIO
This commit is contained in:
Admin
2026-03-04 00:59:36 +05:00
parent 49ba2c27c2
commit f80b83309a
4 changed files with 116 additions and 0 deletions

View File

@@ -14,6 +14,10 @@ WORKDIR /app
# adapter-node produces a standalone build/
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
COPY --from=builder /app/package-lock.json ./
# Install production dependencies (e.g. marked) that are imported at runtime
RUN npm ci --omit=dev
ENV NODE_ENV=production
ENV PORT=3000