mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2026-02-12 15:52:47 +00:00
25 lines
534 B
Bash
25 lines
534 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "🚀 Starting prompts.chat..."
|
|
|
|
# Wait for database to be ready
|
|
echo "⏳ Waiting for database..."
|
|
until nc -z ${DATABASE_HOST:-db} ${DATABASE_PORT:-5432}; do
|
|
sleep 1
|
|
done
|
|
echo "✅ Database is ready"
|
|
|
|
# Run migrations
|
|
echo "📦 Running database migrations..."
|
|
npx prisma migrate deploy
|
|
|
|
# Check if database needs seeding
|
|
echo "🌱 Checking database..."
|
|
# Skip seed check in entrypoint, let the app handle it
|
|
|
|
echo "✨ prompts.chat is starting on port ${PORT:-3000}"
|
|
|
|
# Execute the main command
|
|
exec "$@"
|