fix(orchestrator): copy apps/api/package.json into Dockerfile for prisma generate
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Prisma generate needs a package.json in the inferred project root to identify the workspace. Without it, Prisma tries to auto-install and fails. Copying apps/api/package.json alongside the schema file provides the required project root marker.
This commit is contained in:
@@ -21,7 +21,8 @@ FROM base AS deps
|
|||||||
COPY packages/shared/package.json ./packages/shared/
|
COPY packages/shared/package.json ./packages/shared/
|
||||||
COPY packages/config/package.json ./packages/config/
|
COPY packages/config/package.json ./packages/config/
|
||||||
COPY apps/orchestrator/package.json ./apps/orchestrator/
|
COPY apps/orchestrator/package.json ./apps/orchestrator/
|
||||||
# Copy API prisma schema so prisma generate can run in the orchestrator build
|
# Copy API package.json + prisma schema so prisma generate can find the project root
|
||||||
|
COPY apps/api/package.json ./apps/api/package.json
|
||||||
COPY apps/api/prisma ./apps/api/prisma
|
COPY apps/api/prisma ./apps/api/prisma
|
||||||
|
|
||||||
# Copy npm configuration for native binary architecture hints
|
# Copy npm configuration for native binary architecture hints
|
||||||
@@ -48,7 +49,8 @@ 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/packages/config/node_modules ./packages/config/node_modules
|
||||||
COPY --from=deps /app/apps/orchestrator/node_modules ./apps/orchestrator/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 API package.json + prisma schema so Prisma can find the project root
|
||||||
|
COPY apps/api/package.json ./apps/api/package.json
|
||||||
COPY apps/api/prisma ./apps/api/prisma
|
COPY apps/api/prisma ./apps/api/prisma
|
||||||
RUN pnpm --filter=@mosaic/orchestrator prisma:generate
|
RUN pnpm --filter=@mosaic/orchestrator prisma:generate
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user