b47cc8748d
The app container starts before DNS resolution is ready, causing prisma db push to fail. Entrypoint now retries until the database is reachable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
239 B
Bash
12 lines
239 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "Waiting for database..."
|
|
until npx prisma db push --skip-generate 2>/dev/null; do
|
|
echo "Database not ready, retrying in 3s..."
|
|
sleep 3
|
|
done
|
|
|
|
echo "Database schema synced. Starting server..."
|
|
exec node server.js
|