chefbible/docker-entrypoint.sh
2025-09-08 14:23:31 -04:00

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 "$@"