fix: API+Web Dockerfiles — mock husky, fresh prod deps install
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 8s
Deploy / Build AI Services Image (push) Failing after 11s
E2E Tests / Playwright E2E (push) Failing after 22s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
CI / E2E Tests (push) Has been skipped
Deploy / Build API Image (push) Failing after 19s
Deploy / Build Web Image (push) Failing after 12s
Deploy / Deploy to Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 8s
Deploy / Build AI Services Image (push) Failing after 11s
E2E Tests / Playwright E2E (push) Failing after 22s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
CI / E2E Tests (push) Has been skipped
Deploy / Build API Image (push) Failing after 19s
Deploy / Build Web Image (push) Failing after 12s
Deploy / Deploy to Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
API: Remove --ignore-scripts, mock husky binary instead so postinstall scripts (like prisma) run correctly while avoiding git hook errors. Web: Remove broken flatten stage entirely. Install fresh prod deps in production stage (same approach as API) to avoid pnpm symlink issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,8 +55,10 @@ ENV NODE_ENV=production
|
||||
COPY --from=deps /app/pnpm-lock.yaml /app/pnpm-workspace.yaml /app/package.json /app/turbo.json /app/
|
||||
COPY --from=deps /app/apps/api/package.json /app/apps/api/
|
||||
COPY --from=deps /app/prisma /app/prisma
|
||||
# Mock husky (git hooks tool) so postinstall scripts run without git
|
||||
RUN corepack enable && corepack prepare pnpm@10.27.0 --activate \
|
||||
&& cd /app && pnpm install --frozen-lockfile --filter @goodgo/api... --prod --ignore-scripts \
|
||||
&& printf '#!/bin/sh\nexit 0' > /usr/local/bin/husky && chmod +x /usr/local/bin/husky \
|
||||
&& cd /app && pnpm install --frozen-lockfile --filter @goodgo/api... --prod \
|
||||
&& npx prisma generate
|
||||
# Copy compiled application
|
||||
COPY --from=build --chown=node:node /app/apps/api/dist ./dist
|
||||
|
||||
Reference in New Issue
Block a user