Add complete setup instructions and automated setup script
- 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
This commit is contained in:
36
backend/setup-complete.sh
Executable file
36
backend/setup-complete.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user