|
|
|
@@ -21,7 +21,7 @@ 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
|
|
|
|
# (API prisma schema is copied in builder stage directly into orchestrator/prisma/)
|
|
|
|
|
|
|
|
|
|
|
|
# Copy npm configuration for native binary architecture hints
|
|
|
|
# Copy npm configuration for native binary architecture hints
|
|
|
|
COPY .npmrc ./
|
|
|
|
COPY .npmrc ./
|
|
|
|
@@ -47,11 +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/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
|
|
|
|
|
|
|
|
|
|
|
|
# apps/orchestrator/prisma/schema.prisma is a symlink → ../../api/prisma/schema.prisma
|
|
|
|
# Copy API prisma schema into orchestrator's own prisma/ dir.
|
|
|
|
# Docker COPY follows symlinks, so the schema file is already present after
|
|
|
|
# Running generate from within the orchestrator package avoids cross-package
|
|
|
|
# "COPY apps/orchestrator ./apps/orchestrator" above.
|
|
|
|
# project-root detection issues (Prisma was looking for package.json in /app/apps/).
|
|
|
|
# pnpm turbo build runs prisma:generate first (which uses --schema=./prisma/schema.prisma)
|
|
|
|
COPY apps/api/prisma/schema.prisma ./apps/orchestrator/prisma/schema.prisma
|
|
|
|
# from within the orchestrator package — 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
|
|
|
|
# Build the orchestrator app using TurboRepo
|
|
|
|
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
|
|
|
RUN pnpm turbo build --filter=@mosaic/orchestrator
|
|
|
|
|