jthacker48 wires mike into a rule26 sibling-service stack on ai-server

Jeremy Thacker's fork adds a full Docker + Infisical + deploy-script stack to run mike alongside folio-enrich and other rule26 services. The deployment wiring is rule26-specific and not portable, but two Dockerfile fixes - React 19 peer-dep workaround and a `next.config.ts` transpilation step - will hit anyone containerizing the upstream frontend.

infrastructure

The initial commit drops 10 new files: multi-stage Dockerfiles for backend (Node 20 + LibreOffice) and frontend (Node 20, bakes NEXT_PUBLIC_* at build time), docker-compose.yml mapping host 8094 → frontend and 8095 → backend, .env.defaults (committed non-secret config), .env.example (Infisical-driven secret template), scripts/deploy.sh (pulls from Infisical project rule26/mike, writes .env, runs docker compose up --build, polls /health), a CLAUDE.md guide, integration docs, and a README appendix.

Everything is baked to rule26's ai-server topology: 10.77.1.181, ~/svc/rule26/mike, the Infisical project UUID. None of this ports directly.

Four follow-up commits are all build-fix iteration on the same evening. A path typo in the docs gets corrected (~/projects/legal-tech/mike~/svc/rule26/mike). The more interesting fixes: --legacy-peer-deps has to be added to both npm ci and npm prune --omit=dev in the frontend Dockerfile, because recharts, @uiw/react-md-editor, and auth-helpers-nextjs all declare React 18 peer deps against a React 19 install. Anyone else building the upstream frontend in a clean container will hit the same failure.

The last fix is more surgical. next start parses next.config.ts at startup, but the runtime stage strips devDeps - including TypeScript. The solution: in the builder, run typescript.transpileModule via an inline node -e "..." to emit next.config.js, then copy the .js file into the runtime image instead of the .ts. This is a real gotcha for anyone running the upstream Next.js frontend in a slim production container.

So what Skip the rule26-specific deployment plumbing (paths, Infisical UUID, sibling URLs). The `--legacy-peer-deps` Dockerfile fix and the `next.config.ts → next.config.js` transpilation pattern are worth keeping on the radar if you're containerizing the upstream frontend - you'll hit both issues independently.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

5 commits from jthacker48/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
67e256d6 Add rule26 deployment conventions to mike fork Jeremy Thacker 2026-05-11 ↗ GitHub
commit body
Adds everything needed to run mike as a rule26 sibling service on
ai-server alongside folio-enrich and folio-mapper:

- backend/Dockerfile: Node 20 + LibreOffice multi-stage build
- frontend/Dockerfile: Node 20 multi-stage; bakes NEXT_PUBLIC_* at build time
- docker-compose.yml: two services on ports 8094 (frontend) / 8095 (backend)
- .env.defaults: committed non-secret config (PORT, FRONTEND_URL, R2_BUCKET_NAME)
- .env.example: template for Infisical-driven .env; documents all required secrets
- scripts/deploy.sh: Infisical → .env → docker compose up --build → health poll
- CLAUDE.md: full project guide for future Claude Code sessions
- docs/rule26-integration.md: REST surface doc for sibling services and future chatcya integration
- README.md: appended rule26 deployment section
- .gitignore: added .env.bak, .env.tmp, .claude/; whitelisted .env.defaults

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f076fe13 Fix ai-server deploy path to ~/svc/rule26/mike Jeremy Thacker 2026-05-11 ↗ GitHub
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dc542d9d Fix frontend npm ci peer dep conflict on React 19 Jeremy Thacker 2026-05-11 ↗ GitHub
Several deps (recharts, @uiw/react-md-editor, auth-helpers-nextjs) declare
React 18 peer deps; --legacy-peer-deps lets npm ci proceed without error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ee103f71 Add --legacy-peer-deps to npm prune in frontend Dockerfile Jeremy Thacker 2026-05-11 ↗ GitHub
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d5013f0e Transpile next.config.ts to JS in builder; copy .js to runtime stage Jeremy Thacker 2026-05-11 ↗ GitHub
commit body
Avoids requiring TypeScript in the runtime image. next start parses the
config at startup; with devDeps pruned, tsc is unavailable at runtime.
The builder stage already has TypeScript installed so we transpile there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-431.md from inside the repo you want the changes in.

⬇ Download capture-thread-431.md