3 Commits

Author SHA1 Message Date
043ea0bf9e fix(backend,docker): reconcile migration history (squash) + context7 in compose
Migration history reconciliation:
The autonomous-build migration history was corrupted — 20260109185732 dropped 13
tables still in the schema (Account, Advertisement, ScheduledPost, Chat,
Organization, Report, …) plus their enums/constraints without recreating them, so
a fresh `prisma migrate deploy` failed on the later repair/ALTER migrations
(ScheduledPost, Advertisement, AccountType, …). Squashed the 16 broken migrations
into a single clean 00000000000000_init generated from the current schema (93
tables, 19 enums, incl. MutedWord/MessageReaction/Post.contentLanguage). Verified:
fresh `migrate deploy` applies cleanly on an empty DB; the running DB was
re-baselined (resolve --applied init) and the backend boots healthy.

context7:
Switch the compose service from a broken raw node:20-alpine + read-only-volume +
npm-install setup to the package's upstream pnpm Dockerfile (build context =
context7 monorepo root), serving StreamableHTTP on container :8080 (host :3100);
point aitm-mcp's CONTEXT7_URL at :8080. Now Up/healthy.

Result: all 9 compose services healthy (gitgram backend+web, postgres, redis,
aitm-api/mcp/website, gitnexus, context7). E2e through containers still 201/200.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 04:21:52 +03:00
3408f0c873 feat(docker): bring AITM services into the compose stack (+ mcp/gitnexus Dockerfiles)
aitm-api, aitm-mcp, and gitnexus now build and run healthy in the same
docker-compose stack as gitgram Postgres+Redis.

- NEW aitimemachine/mcp/Dockerfile — multi-stage; builds gitnexus-shared,
  gitnexus (native tree-sitter), the root @gitgram/timemachine lib (rewritten to
  file:.. + --install-links so file: engine deps are copied, not symlinked), then
  the mcp server; runtime starts HTTP transport (node dist/index.js --transport http).
- NEW aitimemachine/gitnexus/Dockerfile — multi-stage (python3/make/g++ for
  tree-sitter); builds gitnexus-shared then gitnexus; serve on 0.0.0.0:3010.
- compose: fix build contexts to the aitimemachine root for aitm-api, aitm-mcp,
  gitnexus (so file:../ engine siblings resolve); gitnexus host port 3010->13010
  (stray host process owned :3010; internal port unchanged).
- scripts/build-engines.sh: npm install before TS engine build when node_modules absent.
- api-server: regenerate stale package-lock; declare ioredis as optionalDependency
  and drop the @ts-ignore in providerHealthService (typed dynamic import, tsc clean).

Verified: aitm-api :3001/health, aitm-mcp :3003/health, gitnexus :13010/api/health
all 200 healthy. aitm-website needs a Clerk key; context7 service def is pre-existing-broken.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 03:01:10 +03:00
be50a0dd88 lets begin 2026-06-22 17:45:56 +03:00