Compare commits

..

1 Commits

Author SHA1 Message Date
0271ec1e49 fix(orchestrator): copy schema file after COPY to overwrite dangling symlink
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Kaniko does NOT follow symlinks — it copies them as-is. The symlink
apps/orchestrator/prisma/schema.prisma → ../../api/prisma/schema.prisma
becomes dangling inside the container since apps/api/ is not present.

Fix: explicitly copy apps/api/prisma/schema.prisma to
apps/orchestrator/prisma/schema.prisma AFTER the COPY apps/orchestrator
step. This overwrites the symlink with the actual file content.

CI still works via the symlink (full monorepo checkout resolves it).
Docker now has the real file at the expected path.
2026-03-07 10:45:44 -06:00

View File

@@ -47,11 +47,10 @@ 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. # Overwrite the symlink (apps/orchestrator/prisma/schema.prisma → ../../api/prisma/schema.prisma)
# Kaniko resolves destination symlinks on COPY, which fails because the symlink # with the real file content. Kaniko copies symlinks AS symlinks (does not follow them),
# target (../../api/prisma/schema.prisma) doesn't exist in the container. # so the symlink target would be dangling inside the container. Copying the actual file
# Fix: remove the dangling symlink first, then copy the real schema file there. # after the orchestrator COPY overwrites the symlink with the resolved content.
RUN rm -f apps/orchestrator/prisma/schema.prisma
COPY apps/api/prisma/schema.prisma ./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 # pnpm turbo build runs prisma:generate (--schema=./prisma/schema.prisma) from the
# orchestrator package context — no cross-package project-root issues. # orchestrator package context — no cross-package project-root issues.