File size: 686 Bytes
80dbe44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
#!/bin/bash

# Start script cho Docker container
# Chạy cả backend và frontend

echo "🚀 Starting Transportation AI Platform..."

# Start backend FastAPI server in background
echo "📡 Starting Backend API Server..."
uvicorn src.main:app --host 0.0.0.0 --port 3454 &
BACKEND_PID=$!

# Wait a bit for backend to start
sleep 5

# Check if backend is running
if curl -f http://localhost:3454/ > /dev/null 2>&1; then
    echo "✅ Backend API is running on port 3454"
else
    echo "❌ Backend failed to start"
    exit 1
fi

# Start frontend Gradio app
echo "🎨 Starting Frontend Gradio App..."
python app.py

# Clean up background process on exit
trap "kill $BACKEND_PID" EXIT