MiroFish / start.sh
wkplhc's picture
Update start.sh
1a87b5e verified
raw
history blame contribute delete
572 Bytes
#!/bin/bash
set +e
echo "=== System Info ==="
python --version
node -v
echo "[1/3] Starting Nginx..."
service nginx start
echo "[2/3] Starting Backend..."
cd /app/backend
# 添加 PYTHONPATH 确保模块引用正常
export PYTHONPATH=$PYTHONPATH:/app/backend
nohup python run.py > /app/backend.log 2>&1 &
echo "Waiting for backend..."
sleep 5
echo "[3/3] Starting Frontend..."
cd /app/frontend
# 强制绑定 0.0.0.0
nohup npm run dev -- --port 3000 --host 0.0.0.0 > /app/frontend.log 2>&1 &
echo "=== Services Started ==="
tail -f /app/backend.log /app/frontend.log