Files
asle/backend/setup-complete.sh

37 lines
767 B
Bash
Raw Normal View History

#!/bin/bash
# Complete setup script - run after database is configured
set -e
echo "=== ASLE Complete Setup ==="
echo ""
# Check if DATABASE_URL is configured
if ! grep -q "DATABASE_URL=" .env || grep -q "user:password" .env; then
echo "❌ Please configure DATABASE_URL in backend/.env first"
echo " See DATABASE_SETUP.md for instructions"
exit 1
fi
echo "✅ Environment configured"
echo ""
# Run migrations
echo "Running database migrations..."
npm run prisma:migrate
echo ""
echo "Initializing database..."
npm run setup:db
echo ""
echo "Creating admin user..."
npm run setup:admin
echo ""
echo "✅ Setup complete!"
echo ""
echo "Next steps:"
echo " 1. Start backend: npm run dev"
echo " 2. Start frontend: cd ../frontend && npm run dev"