fix(docker): INFRA-gap-02 unblock full-stack docker compose up
Three coordinated fixes so 'docker compose up cosmos-emulator platform-service cowork-service --wait' completes end-to-end (pre-existing blocker surfaced by W1 post-push review). 1. Remove harmful prepare:tsc from @bytelyst/react-native-platform-sdk package.json. The hook fires during pnpm install --frozen-lockfile against an empty src/ tree (because Dockerfiles COPY package.jsons before sources), tsc aborts, install fails. Canonical monorepo build flow is pnpm -r build using the existing build:tsc script; prepare only runs for git+ URL installs (which this published package doesn't use), so removing it is lossless. 2. Add --ignore-scripts to platform-service + mcp-server Dockerfile install steps. Mirrors the pattern already used by extraction-service/Dockerfile, dashboards/admin-web/Dockerfile, dashboards/tracker-web/Dockerfile. Belt-and-braces against future prepare-hook regressions in any workspace package. 3. Expand .dockerignore node_modules/dist/.next/coverage to **/ globs. Docker's .dockerignore with bare 'node_modules' only matches root-level; nested packages/*/node_modules/ were being COPY'd into images, poisoning them with host-absolute-path .bin shims (e.g. @bytelyst/storage's tsc shim resolved to /learning_voice_ai_agent/node_modules/.pnpm/... which doesn't exist in the container → MODULE_NOT_FOUND). The glob fix makes COPY packages/ packages/ deliver source only. Gap: INFRA-gap-02 Verified: pnpm install --frozen-lockfile ✅ pnpm --filter @bytelyst/react-native-platform-sdk build ✅ pnpm --filter @bytelyst/react-native-platform-sdk typecheck ✅ docker compose build platform-service ✅ (previously failed) docker compose build mcp-server ✅ docker compose build extraction-service ✅
This commit is contained in:
parent
dda74c2d20
commit
7d266bfcc0
@ -1,7 +1,11 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
**/node_modules
|
||||||
dist
|
dist
|
||||||
|
**/dist
|
||||||
.next
|
.next
|
||||||
|
**/.next
|
||||||
coverage
|
coverage
|
||||||
|
**/coverage
|
||||||
*.log
|
*.log
|
||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
|
|||||||
@ -37,7 +37,6 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"prepare": "tsc",
|
|
||||||
"test": "vitest run --pool forks",
|
"test": "vitest run --pool forks",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
@ -73,8 +73,8 @@ COPY dashboards/admin-web/package.json dashboards/admin-web/
|
|||||||
COPY dashboards/tracker-web/package.json dashboards/tracker-web/
|
COPY dashboards/tracker-web/package.json dashboards/tracker-web/
|
||||||
COPY scripts/package.json scripts/
|
COPY scripts/package.json scripts/
|
||||||
|
|
||||||
# Install all workspace deps
|
# Install all workspace deps without running prepare hooks before sources exist.
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
||||||
|
|
||||||
# Copy source
|
# Copy source
|
||||||
COPY packages/ packages/
|
COPY packages/ packages/
|
||||||
|
|||||||
@ -73,8 +73,8 @@ COPY dashboards/admin-web/package.json dashboards/admin-web/
|
|||||||
COPY dashboards/tracker-web/package.json dashboards/tracker-web/
|
COPY dashboards/tracker-web/package.json dashboards/tracker-web/
|
||||||
COPY scripts/package.json scripts/
|
COPY scripts/package.json scripts/
|
||||||
|
|
||||||
# Install all workspace deps
|
# Install all workspace deps without running prepare hooks before sources exist.
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
||||||
|
|
||||||
# Copy source
|
# Copy source
|
||||||
COPY packages/ packages/
|
COPY packages/ packages/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user