Download prisma binaries on build time - #13
Merged
mateo-di merged 26 commits intoOct 9, 2025
Merged
Conversation
mateo-di
marked this pull request as ready for review
September 30, 2025 20:10
- Update litellm-proxy-extras to look for Prisma CLI in correct location (/app/.cache/prisma-python/binaries/node_modules/.bin/prisma) - Dockerfile properly pre-caches Prisma binaries during build - Enable offline mode to prevent npm downloads at runtime (403 errors) - Add PRISMA_OFFLINE_MODE=true environment variable support
- Remove unnecessary npm install step that was failing - Prisma Python package already installs CLI to /app/.cache/prisma-python/binaries/ - Update all references from nodeenv to binaries directory - Fix symlink to point to correct location - Simplify Dockerfile and remove redundant installation steps
- Simplify Python utils.py to use single known path for Prisma CLI - Remove unnecessary verification steps from Dockerfile - Consolidate environment variables into cleaner format - Remove redundant mkdir and debugging commands - Focus on essential functionality only
- Add create_views.py from db_scripts to runtime image - Makes it available at /app/create_views.py for downstream images - Eliminates need to copy this file in child Dockerfiles
- Add intelligent detection for when to run view creation - Skip gracefully if no DATABASE_URL or non-PostgreSQL database - Handle connection issues without showing errors (DB might not be ready) - Add silent mode via CREATE_VIEWS_SILENT environment variable - Only show errors for actual problems, not expected conditions
mateo-di
added a commit
that referenced
this pull request
Nov 22, 2025
Root cause: Commit b2a56a2 removed NPM_CONFIG_CACHE and PRISMA_BINARY_CACHE_DIR env vars from runtime prisma generate, causing 403 errors when Prisma tried to download from npm registry. Solution: Restore env vars to tell Prisma to use pre-cached binaries from builder stage at /app/.cache/prisma-python/binaries. This fixes the Cloud Run error: npm ERR! 403 403 Forbidden - GET https://registry.npmjs.org/prisma Related: PR #13 (original working implementation)
1 task
3 tasks
3 tasks
This was referenced Apr 13, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitType
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes