mirror of
https://github.com/taogaetz/chefbible.git
synced 2025-12-06 11:47:24 -05:00
19 lines
462 B
Bash
19 lines
462 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Wait for database to be ready (if using external database)
|
|
# For SQLite, this is not needed, but good practice for future database changes
|
|
|
|
echo "Running database migrations..."
|
|
# Use the DATABASE_URL from environment or default to SQLite
|
|
if [ -z "$DATABASE_URL" ]; then
|
|
export DATABASE_URL="file:/app/data/database.db"
|
|
fi
|
|
npx prisma migrate deploy
|
|
|
|
echo "Seeding database..."
|
|
npx prisma db seed
|
|
|
|
echo "Starting application..."
|
|
exec "$@"
|