fix(orchestrator): copy schema to overwrite dangling symlink in Docker (#709)
Some checks failed
ci/woodpecker/push/ci Pipeline failed

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #709.
This commit is contained in:
2026-03-07 16:45:54 +00:00
committed by jason.woltje
parent 7d47e5ff99
commit 123cbce5cd

View File

@@ -47,11 +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/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 # Overwrite the symlink (apps/orchestrator/prisma/schema.prisma → ../../api/prisma/schema.prisma)
# Docker COPY follows symlinks, so the schema file is already present after # with the real file content. Kaniko copies symlinks AS symlinks (does not follow them),
# "COPY apps/orchestrator ./apps/orchestrator" above. # so the symlink target would be dangling inside the container. Copying the actual file
# pnpm turbo build runs prisma:generate first (which uses --schema=./prisma/schema.prisma) # after the orchestrator COPY overwrites the symlink with the resolved content.
# from within the orchestrator package — no cross-package project-root issues. 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