BREAKING: postgres + saas

This commit is contained in:
Vasily Zubarev
2025-04-03 13:07:54 +02:00
parent 54a892ddb0
commit f523b1f8ba
136 changed files with 3971 additions and 1563 deletions

View File

@@ -1,14 +1,18 @@
#!/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
# Initialize database
echo "Checking and seeding database if needed..."
npm run seed
# Start the application
echo "Starting the application..."
exec "$@"