Compare commits

...

4 Commits

Author SHA1 Message Date
945f4ba12a fix(orchestrator): rm dangling symlink before COPY in Docker builder
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Kaniko resolves destination symlinks during COPY. Writing to
apps/orchestrator/prisma/schema.prisma (a symlink → ../../api/prisma/schema.prisma)
causes kaniko to try to resolve /app/apps/api which does not exist → build fails.

Fix: RUN rm -f the symlink first so the destination path is clean,
then COPY the real schema file to that location.

CI is unaffected (symlink resolves correctly in the monorepo checkout).
2026-03-07 11:00:27 -06:00
123cbce5cd 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>
2026-03-07 16:45:54 +00:00
7d47e5ff99 fix(orchestrator): use symlink path ./prisma/schema.prisma in generate script (#708)
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>
2026-03-07 16:31:49 +00:00
ef674206e7 fix(orchestrator): symlink prisma/schema.prisma to resolve Docker build root detection (#707)
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>
2026-03-07 16:17:20 +00:00
3 changed files with 9 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ FROM base AS deps
COPY packages/shared/package.json ./packages/shared/
COPY packages/config/package.json ./packages/config/
COPY apps/orchestrator/package.json ./apps/orchestrator/
# (API prisma schema is copied in builder stage directly into orchestrator/prisma/)
# API schema is available via apps/orchestrator/prisma/schema.prisma symlink
# Copy npm configuration for native binary architecture hints
COPY .npmrc ./
@@ -47,11 +47,14 @@ 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
# Copy API prisma schema into orchestrator's own prisma/ dir.
# Running generate from within the orchestrator package avoids cross-package
# project-root detection issues (Prisma was looking for package.json in /app/apps/).
# The repo has apps/orchestrator/prisma/schema.prisma as a symlink for CI use.
# Kaniko resolves destination symlinks on COPY, which fails because the symlink
# target (../../api/prisma/schema.prisma) doesn't exist in the container.
# 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
RUN cd apps/orchestrator && ./node_modules/.bin/prisma generate --schema=./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

View File

@@ -52,8 +52,5 @@
"tsconfig-paths": "^4.2.0",
"typescript": "^5.8.2",
"vitest": "^4.0.18"
},
"prisma": {
"schema": "prisma/schema.prisma"
}
}

View File

@@ -0,0 +1 @@
../../api/prisma/schema.prisma