File size: 872 Bytes
038ee19
 
 
 
 
 
 
 
a96c62e
 
 
038ee19
a96c62e
038ee19
 
 
 
 
 
 
 
 
a96c62e
ef9a3cc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# BatchMind OS — Startup Script for Docker
# Starts both backend API and frontend dev server

echo "============================================"
echo "  BatchMind OS — Starting Services..."
echo "============================================"

# Get the directory where the script is running
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Start frontend (serve built files with a simple Python HTTP server)
cd "$ROOT_DIR/batchmind_os/frontend"
if [ -d "dist" ]; then
    echo "✅ Serving frontend from built files on port 5173..."
    python -m http.server 5173 --directory dist &
else
    echo "⚠️  Frontend not built, starting dev server..."
    npm run dev -- --host 0.0.0.0 &
fi

# Start backend
cd "$ROOT_DIR"
echo "✅ Starting FastAPI backend on port 7860..."
python -m uvicorn batchmind_os.api.main:app --host 0.0.0.0 --port 7860