From e3987c2fe66c9b838c027a05b938e70a276f9655 Mon Sep 17 00:00:00 2001 From: yznahmad Date: Sun, 7 Sep 2025 03:53:58 +0300 Subject: [PATCH] gg --- start.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 start.sh 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