Monorepo for Aesthetic.Computer aesthetic.computer
at main 65 lines 1.7 kB view raw
1#!/usr/bin/env fish 2 3# Content Filter Dashboard Startup Script 4 5echo "🛡️ Starting Content Filter Dashboard..." 6echo "" 7 8# Check if Ollama is running 9if not pgrep -f "ollama serve" > /dev/null 10 echo "❌ Ollama daemon is not running!" 11 echo " Start it with: ac-llama start" 12 exit 1 13end 14 15echo "✅ Ollama daemon is running" 16 17# Check if gemma2:2b model is available 18if not ollama list | grep -q "gemma2:2b" 19 echo "⚠️ Model gemma2:2b not found!" 20 echo " Pull it with: ollama pull gemma2:2b" 21 exit 1 22end 23 24echo "✅ Model gemma2:2b is available" 25 26# Start the API server in the background 27echo "" 28echo "🚀 Starting API server on port 3000..." 29node /workspaces/aesthetic-computer/censor/api-server.mjs & 30set api_pid $last_pid 31 32sleep 2 33 34# Start Caddy 35echo "🌐 Starting Caddy web server on port 8080..." 36caddy run --config /workspaces/aesthetic-computer/censor/Caddyfile & 37set caddy_pid $last_pid 38 39sleep 2 40 41echo "" 42echo "═══════════════════════════════════════════════" 43echo "✨ Content Filter Dashboard is ready!" 44echo "═══════════════════════════════════════════════" 45echo "" 46echo "📊 Dashboard: http://localhost:8080" 47echo "🔌 API Server: http://localhost:3000/api/filter" 48echo "" 49echo "Press Ctrl+C to stop all services" 50echo "" 51 52# Wait for interrupt 53function cleanup 54 echo "" 55 echo "🛑 Stopping services..." 56 kill $api_pid $caddy_pid 2>/dev/null 57 echo "✅ All services stopped" 58end 59 60trap cleanup INT TERM 61 62# Keep script running 63while true 64 sleep 1 65end