Keep prisma in production dependencies for container migrate.
Prebuilt images copy host node_modules; with omit=dev the CLI was missing and the API crash-looped. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,13 +8,17 @@ echo "OpenSSL: $(openssl version 2>/dev/null || echo missing)"
|
||||
DB_HOST=$(printf '%s' "$DATABASE_URL" | sed -n 's|.*@\([^:/]*\).*|\1|p')
|
||||
echo "DATABASE_URL host: ${DB_HOST:-unknown}"
|
||||
|
||||
if [ ! -x ./node_modules/.bin/prisma ]; then
|
||||
echo "ERROR: ./node_modules/.bin/prisma پیدا نشد. روی سرور npm ci بزن."
|
||||
if [ ! -x ./node_modules/.bin/prisma ] && [ ! -f ./node_modules/prisma/build/index.js ]; then
|
||||
echo "ERROR: prisma در node_modules نیست. روی سرور بزن:"
|
||||
echo " npm install prisma --no-audit --no-fund --registry=https://registry.npmmirror.com"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# از npx استفاده نکن — روی بعضی سرورها برای چک رجیستری آویزان میماند
|
||||
if [ -x ./node_modules/.bin/prisma ]; then
|
||||
PRISMA="./node_modules/.bin/prisma"
|
||||
else
|
||||
PRISMA="node ./node_modules/prisma/build/index.js"
|
||||
fi
|
||||
|
||||
echo "Waiting for database & applying migrations..."
|
||||
i=0
|
||||
|
||||
+1
-1
@@ -50,6 +50,7 @@
|
||||
"dotenv": "^17.4.2",
|
||||
"passport": "^0.7.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"prisma": "^6.19.3",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
@@ -72,7 +73,6 @@
|
||||
"globals": "^17.0.0",
|
||||
"jest": "^30.0.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prisma": "^6.19.3",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^7.0.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
|
||||
Reference in New Issue
Block a user