Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
NEW FILES: - deploy.sh: One-command setup script (installs deps, creates venv, init db) - start.sh: Quick start script (launches both backend & frontend) - backend/scripts/init_db.py: Database initialization with schema + seed data CHANGES: - README: Added one-command setup instructions - All scripts made executable SERVER DEPLOYMENT: 1. git pull 2. chmod +x deploy.sh && ./deploy.sh 3. ./start.sh (or use PM2/Docker) The init_db.py script: - Creates all database tables - Seeds basic TLD info (com, net, org, io, etc.) - Works with both SQLite and PostgreSQL
66 lines
1.4 KiB
Bash
Executable File
66 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# POUNCE Quick Start Script
|
|
# Starts both backend and frontend for development
|
|
#
|
|
|
|
set -e
|
|
|
|
echo "🐆 Starting POUNCE..."
|
|
echo ""
|
|
|
|
# Check if backend venv exists
|
|
if [ ! -d "backend/venv" ]; then
|
|
echo "❌ Backend not set up. Run ./deploy.sh first!"
|
|
exit 1
|
|
fi
|
|
|
|
# Kill any existing processes on our ports
|
|
echo "🔧 Cleaning up old processes..."
|
|
lsof -ti:8000 | xargs kill -9 2>/dev/null || true
|
|
lsof -ti:3000 | xargs kill -9 2>/dev/null || true
|
|
sleep 1
|
|
|
|
# Start Backend
|
|
echo "🚀 Starting Backend on port 8000..."
|
|
cd backend
|
|
source venv/bin/activate
|
|
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 &
|
|
BACKEND_PID=$!
|
|
cd ..
|
|
|
|
# Wait for backend to start
|
|
sleep 3
|
|
|
|
# Check if backend is running
|
|
if curl -s http://localhost:8000/health > /dev/null 2>&1; then
|
|
echo "✅ Backend running!"
|
|
else
|
|
echo "❌ Backend failed to start. Check logs."
|
|
exit 1
|
|
fi
|
|
|
|
# Start Frontend
|
|
echo "🚀 Starting Frontend on port 3000..."
|
|
cd frontend
|
|
npm run dev &
|
|
FRONTEND_PID=$!
|
|
cd ..
|
|
|
|
echo ""
|
|
echo "================================================"
|
|
echo " POUNCE is starting..."
|
|
echo "================================================"
|
|
echo ""
|
|
echo " Backend: http://localhost:8000"
|
|
echo " Frontend: http://localhost:3000"
|
|
echo " API Docs: http://localhost:8000/docs"
|
|
echo ""
|
|
echo " Press Ctrl+C to stop all services"
|
|
echo ""
|
|
|
|
# Wait for both processes
|
|
trap "kill $BACKEND_PID $FRONTEND_PID 2>/dev/null" EXIT
|
|
wait
|
|
|