|
|
|
|
@@ -21,7 +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/
|
|
|
|
|
# API schema is available via apps/orchestrator/prisma/schema.prisma symlink
|
|
|
|
|
# (API prisma schema is copied in builder stage directly into orchestrator/prisma/)
|
|
|
|
|
|
|
|
|
|
# Copy npm configuration for native binary architecture hints
|
|
|
|
|
COPY .npmrc ./
|
|
|
|
|
@@ -47,14 +47,11 @@ 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
|
|
|
|
|
|
|
|
|
|
# The repo has apps/orchestrator/prisma/schema.prisma as a symlink for CI use.
|
|
|
|
|
# Kaniko resolves destination symlinks on COPY, which fails because the symlink
|
|
|
|
|
# target (../../api/prisma/schema.prisma) doesn't exist in the container.
|
|
|
|
|
# Fix: remove the dangling symlink first, then copy the real schema file there.
|
|
|
|
|
RUN rm -f apps/orchestrator/prisma/schema.prisma
|
|
|
|
|
# Copy API prisma schema into orchestrator's own prisma/ dir.
|
|
|
|
|
# Running generate from within the orchestrator package avoids cross-package
|
|
|
|
|
# project-root detection issues (Prisma was looking for package.json in /app/apps/).
|
|
|
|
|
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.
|
|
|
|
|
RUN cd apps/orchestrator && ./node_modules/.bin/prisma generate --schema=./prisma/schema.prisma
|
|
|
|
|
|
|
|
|
|
# Build the orchestrator app using TurboRepo
|
|
|
|
|
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
|
|
|
|
|