imkFinal/backend/start-dev.sh

12 lines
225 B
Bash
Executable File

#!/bin/sh
until pg_isready -h postgres -p 5432 -U ${POSTGRES_USER} -d ${POSTGRES_DB}; do
echo "Waiting for postgres..."
sleep 2
done
echo "PostgreSQL is ready!"
npx prisma migrate dev --name init
npm run start:dev