Private
Public Access
1
0

Show prisma db push errors in entrypoint, add .gitattributes for LF

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-25 21:59:23 -05:00
parent b47cc8748d
commit f90489c2ff
2 changed files with 18 additions and 3 deletions
+16 -3
View File
@@ -2,10 +2,23 @@
set -e
echo "Waiting for database..."
until npx prisma db push --skip-generate 2>/dev/null; do
echo "Database not ready, retrying in 3s..."
MAX_RETRIES=30
RETRY=0
while [ $RETRY -lt $MAX_RETRIES ]; do
if npx prisma db push --skip-generate 2>&1; then
echo "Database schema synced successfully."
break
fi
RETRY=$((RETRY + 1))
echo "Database not ready (attempt $RETRY/$MAX_RETRIES), retrying in 3s..."
sleep 3
done
echo "Database schema synced. Starting server..."
if [ $RETRY -ge $MAX_RETRIES ]; then
echo "ERROR: Could not connect to database after $MAX_RETRIES attempts."
exit 1
fi
echo "Starting server..."
exec node server.js