fix: API install prisma+generate in pruned, AI use absolute cargo path
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 16s
CI / E2E Tests (push) Has been skipped
Deploy / Build API Image (push) Failing after 24s
Deploy / Build Web Image (push) Failing after 35s
Deploy / Build AI Services Image (push) Failing after 1m22s
E2E Tests / Playwright E2E (push) Failing after 19s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped

- API: npm install prisma @prisma/client in pruned dir before generate
- AI: use /root/.cargo/bin/cargo directly, install underthesea with --no-build-isolation

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ho Ngoc Hai
2026-04-13 23:59:14 +07:00
parent 58781235f8
commit 3e4f681adb
2 changed files with 11 additions and 6 deletions

View File

@@ -35,11 +35,13 @@ RUN npx prisma generate \
&& cd apps/api && npx nest build
# Use pnpm deploy to produce a flat, production-only node_modules
# Then re-generate Prisma client inside pruned dir (pnpm deploy doesn't carry .prisma)
# Then install prisma + generate client in pruned dir (pnpm deploy strips dev deps)
RUN pnpm deploy --legacy --filter @goodgo/api --prod /app/pruned \
&& cd /app/pruned \
&& cp -r /app/prisma ./prisma \
&& npx prisma generate
&& npm install --no-save prisma @prisma/client \
&& npx prisma generate \
&& npm remove --no-save prisma
# ---- Production ----
FROM node:22-slim AS production