16 lines
315 B
Bash
16 lines
315 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
i=0
|
|
until node scripts/migrate.mjs; do
|
|
i=$((i + 1))
|
|
if [ "$i" -ge 30 ]; then
|
|
echo "Datenbank nicht erreichbar, Migration abgebrochen." >&2
|
|
exit 1
|
|
fi
|
|
echo "Migration erneut in 2s (Versuch $i)…" >&2
|
|
sleep 2
|
|
done
|
|
|
|
exec ./node_modules/.bin/next start -H 0.0.0.0 -p "${PORT:-3000}"
|