mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 09:59:41 +02:00
These files have been sitting untracked in working trees on multiple
machines since the unified module-registry refactor. database.ts
imports from $lib/data/module-registry but the file itself was never
git-add'd, so the production build crashes on any clean clone with:
Could not resolve "./module-registry" from "src/lib/data/database.ts"
Discovered today during the first deploy of the Memoro recording
pipeline: pulling onto the Mac Mini (which had its own untracked copies
of these files in a stash) revealed that origin/main has been silently
broken for clean builds. Fixed by committing the canonical versions:
- apps/mana/apps/web/src/lib/data/module-registry.ts
- apps/mana/apps/web/src/lib/data/module-registry.test.ts
- apps/mana/apps/web/src/lib/modules/{31 modules}/module.config.ts
The events module already had its module.config.ts committed in
6a60e22a3 (events Phase 2), so it isn't included here.
Also bumps apps/mana/apps/web/Dockerfile build heap from 4096 → 8192:
the unified app outgrew the 4 GB ceiling somewhere between Sprint 2
and Sprint 3 of the data layer rewrite, and Vite OOMs while bundling
all 32 module chunks. The bump existed locally on multiple boxes but
was never committed; today's deploy hit the OOM and required restoring
the bump from a stash to make the image rebuild succeed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.7 KiB
Docker
45 lines
1.7 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM sveltekit-base:local AS builder
|
|
|
|
ARG PUBLIC_BACKEND_URL=http://mana-auth
|
|
ARG PUBLIC_MANA_AUTH_URL=http://mana-auth:3001
|
|
ARG MIDDLEWARE_URL=http://mana-auth:3001
|
|
ARG PUBLIC_SYNC_SERVER_URL=wss://sync.mana.how
|
|
ENV PUBLIC_BACKEND_URL=$PUBLIC_BACKEND_URL
|
|
ENV PUBLIC_MANA_AUTH_URL=$PUBLIC_MANA_AUTH_URL
|
|
ENV MIDDLEWARE_URL=$MIDDLEWARE_URL
|
|
ENV PUBLIC_SYNC_SERVER_URL=$PUBLIC_SYNC_SERVER_URL
|
|
|
|
COPY apps/mana/apps/web ./apps/mana/apps/web
|
|
COPY apps/calc/packages/shared ./apps/calc/packages/shared
|
|
COPY apps/zitare/packages/content ./apps/zitare/packages/content
|
|
COPY packages/shared-uload ./packages/shared-uload
|
|
COPY packages/local-llm ./packages/local-llm
|
|
|
|
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
|
pnpm install --no-frozen-lockfile --ignore-scripts
|
|
|
|
# Build dependencies that need compilation
|
|
WORKDIR /app/apps/zitare/packages/content
|
|
RUN pnpm build
|
|
|
|
WORKDIR /app/apps/mana/apps/web
|
|
RUN pnpm exec svelte-kit sync
|
|
# Build heap was bumped 4096→8192 after the unified app grew past the
|
|
# 4 GB ceiling — Vite OOMs while bundling all 32 module chunks otherwise.
|
|
RUN NODE_OPTIONS="--max-old-space-size=8192" pnpm build
|
|
|
|
FROM node:20-alpine AS production
|
|
WORKDIR /app/apps/mana/apps/web
|
|
COPY --from=builder /app/node_modules/.pnpm /app/node_modules/.pnpm
|
|
COPY --from=builder /app/apps/mana/apps/web/node_modules ./node_modules
|
|
COPY --from=builder /app/apps/mana/apps/web/build ./build
|
|
COPY --from=builder /app/apps/mana/apps/web/package.json ./
|
|
|
|
EXPOSE 5000
|
|
ENV NODE_ENV=production PORT=5000 HOST=0.0.0.0
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:5000/health || exit 1
|
|
|
|
CMD ["node", "build"]
|