From 123cbce5cd1bdd1aa6880cf33a0c3c74d18fd825 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sat, 7 Mar 2026 16:45:54 +0000 Subject: [PATCH] fix(orchestrator): copy schema to overwrite dangling symlink in Docker (#709) Co-authored-by: Jason Woltje Co-committed-by: Jason Woltje --- apps/orchestrator/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/orchestrator/Dockerfile b/apps/orchestrator/Dockerfile index d8c929c..4999d8e 100644 --- a/apps/orchestrator/Dockerfile +++ b/apps/orchestrator/Dockerfile @@ -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/apps/orchestrator/node_modules ./apps/orchestrator/node_modules -# apps/orchestrator/prisma/schema.prisma is a symlink → ../../api/prisma/schema.prisma -# Docker COPY follows symlinks, so the schema file is already present after -# "COPY apps/orchestrator ./apps/orchestrator" above. -# pnpm turbo build runs prisma:generate first (which uses --schema=./prisma/schema.prisma) -# from within the orchestrator package — no cross-package project-root issues. +# Overwrite the symlink (apps/orchestrator/prisma/schema.prisma → ../../api/prisma/schema.prisma) +# with the real file content. Kaniko copies symlinks AS symlinks (does not follow them), +# so the symlink target would be dangling inside the container. Copying the actual file +# after the orchestrator COPY overwrites the symlink with the resolved content. +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 RUN pnpm turbo build --filter=@mosaic/orchestrator