|
|
|
@@ -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/
|
|
|
|
# API schema is available via apps/orchestrator/prisma/schema.prisma symlink
|
|
|
|
# Copy API prisma schema so prisma generate can run in the orchestrator build
|
|
|
|
|
|
|
|
COPY apps/api/prisma ./apps/api/prisma
|
|
|
|
|
|
|
|
|
|
|
|
# Copy npm configuration for native binary architecture hints
|
|
|
|
# Copy npm configuration for native binary architecture hints
|
|
|
|
COPY .npmrc ./
|
|
|
|
COPY .npmrc ./
|
|
|
|
@@ -47,14 +48,9 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
# The repo has apps/orchestrator/prisma/schema.prisma as a symlink for CI use.
|
|
|
|
# Copy API prisma schema and generate the Prisma client for the orchestrator
|
|
|
|
# Kaniko resolves destination symlinks on COPY, which fails because the symlink
|
|
|
|
COPY apps/api/prisma ./apps/api/prisma
|
|
|
|
# target (../../api/prisma/schema.prisma) doesn't exist in the container.
|
|
|
|
RUN pnpm --filter=@mosaic/orchestrator prisma:generate
|
|
|
|
# Fix: remove the dangling symlink first, then copy the real schema file there.
|
|
|
|
|
|
|
|
RUN rm -f apps/orchestrator/prisma/schema.prisma
|
|
|
|
|
|
|
|
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
|
|
|
|
# Build the orchestrator app using TurboRepo
|
|
|
|
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
|
|
|
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
|
|
|
|