Compare commits
5 Commits
fix/ms23-p
...
fix/ms23-p
| Author | SHA1 | Date | |
|---|---|---|---|
| 0271ec1e49 | |||
| 7d47e5ff99 | |||
| ef674206e7 | |||
| 977747599f | |||
| fc4699ca51 |
@@ -21,8 +21,7 @@ FROM base AS deps
|
||||
COPY packages/shared/package.json ./packages/shared/
|
||||
COPY packages/config/package.json ./packages/config/
|
||||
COPY apps/orchestrator/package.json ./apps/orchestrator/
|
||||
# Copy API prisma schema so prisma generate can run in the orchestrator build
|
||||
COPY apps/api/prisma ./apps/api/prisma
|
||||
# API schema is available via apps/orchestrator/prisma/schema.prisma symlink
|
||||
|
||||
# Copy npm configuration for native binary architecture hints
|
||||
COPY .npmrc ./
|
||||
@@ -48,9 +47,13 @@ COPY --from=deps /app/packages/shared/node_modules ./packages/shared/node_module
|
||||
COPY --from=deps /app/packages/config/node_modules ./packages/config/node_modules
|
||||
COPY --from=deps /app/apps/orchestrator/node_modules ./apps/orchestrator/node_modules
|
||||
|
||||
# Copy API prisma schema and generate the Prisma client for the orchestrator
|
||||
COPY apps/api/prisma ./apps/api/prisma
|
||||
RUN pnpm --filter=@mosaic/orchestrator prisma:generate
|
||||
# Overwrite the symlink (apps/orchestrator/prisma/schema.prisma → ../../api/prisma/schema.prisma)
|
||||
# with the real file content. Kaniko copies symlinks AS symlinks (does not follow them),
|
||||
# so the symlink target would be dangling inside the container. Copying the actual file
|
||||
# after the orchestrator COPY overwrites the symlink with the resolved content.
|
||||
COPY apps/api/prisma/schema.prisma ./apps/orchestrator/prisma/schema.prisma
|
||||
# pnpm turbo build runs prisma:generate (--schema=./prisma/schema.prisma) from the
|
||||
# orchestrator package context — no cross-package project-root issues.
|
||||
|
||||
# Build the orchestrator app using TurboRepo
|
||||
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"dev": "nest start --watch",
|
||||
"lint": "eslint src/",
|
||||
"lint:fix": "eslint src/ --fix",
|
||||
"prisma:generate": "prisma generate --schema=../api/prisma/schema.prisma",
|
||||
"prisma:generate": "prisma generate --schema=./prisma/schema.prisma",
|
||||
"start": "node dist/main.js",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:dev": "nest start --watch",
|
||||
|
||||
1
apps/orchestrator/prisma/schema.prisma
Symbolic link
1
apps/orchestrator/prisma/schema.prisma
Symbolic link
@@ -0,0 +1 @@
|
||||
../../api/prisma/schema.prisma
|
||||
Reference in New Issue
Block a user