- Create setup-complete.sh for automated setup after DB configuration - Add COMPLETE_SETUP_INSTRUCTIONS.md with step-by-step guide - Document remaining steps that require database authentication
37 lines
767 B
Bash
Executable File
37 lines
767 B
Bash
Executable File
#!/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"
|