gg
This commit is contained in:
parent
812e668e17
commit
e3987c2fe6
27
start.sh
Normal file
27
start.sh
Normal file
@ -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
|
||||||
Loading…
Reference in New Issue
Block a user