24 lines
539 B
Bash
Executable File
24 lines
539 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$REPO_DIR"
|
|
|
|
echo "🔄 Restarting app services..."
|
|
|
|
# Kill running uvicorn and vite processes
|
|
pkill -f "uvicorn backend.main:app" || true
|
|
pkill -f "vite" || true
|
|
sleep 1
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# Run backend
|
|
nohup uv run uvicorn backend.main:app --host 0.0.0.0 --port 8000 > "$REPO_DIR/data/backend.log" 2>&1 &
|
|
|
|
# Run frontend
|
|
cd "$REPO_DIR/frontend"
|
|
nohup npm run dev > "$REPO_DIR/data/frontend.log" 2>&1 &
|
|
|
|
echo "✅ Services restarted."
|