mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
19 lines
398 B
Bash
19 lines
398 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Wait for database to be ready
|
|
echo "Waiting for PostgreSQL to be ready..."
|
|
until pg_isready -h postgres -p 5432 -U postgres; do
|
|
echo "PostgreSQL is unavailable - sleeping"
|
|
sleep 1
|
|
done
|
|
echo "PostgreSQL is ready!"
|
|
|
|
# Run database migrations
|
|
echo "Running database migrations..."
|
|
npx prisma migrate deploy
|
|
|
|
# Start the application
|
|
echo "Starting the application..."
|
|
exec "$@"
|