diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..ecd0159 --- /dev/null +++ b/start.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +echo "Starting Phosphat Report Application..." + +# Run database migrations +echo "Running database migrations..." +npx prisma db push --accept-data-loss + +# Run seed using production script +echo "Seeding database..." +if [ -f "scripts/seed-production.js" ]; then + echo "Using production seed script..." + node scripts/seed-production.js +else + echo "Production seed script not found, trying alternative methods..." + if [ -f "prisma/seed.js" ]; then + echo "Using JavaScript seed file..." + node prisma/seed.js + else + echo "No seeding method available, skipping..." + fi +fi + +echo "Database setup complete. Starting application on port 3000..." +export PORT=3000 +exec npx remix-serve ./build/server/index.js \ No newline at end of file