#!/bin/bash # FAM-Edge 启动脚本 (Oracle 端) # 用法: ./scripts/start_edge.sh set -e APP_DIR="$(cd "$(dirname "$0")/.." && pwd)/fam-edge" CONFIG_FILE="$APP_DIR/config/config.yaml" if [ ! -f "$CONFIG_FILE" ]; then echo "错误: 配置文件不存在: $CONFIG_FILE" echo "请复制 config.yaml.example 为 config.yaml 并修改实际值" exit 1 fi cd "$APP_DIR" # 检查虚拟环境 if [ -d "venv" ]; then source venv/bin/activate fi echo "启动 FAM-Edge (端口 5000)..." exec gunicorn -w 1 -b 0.0.0.0:5000 --timeout 600 src.fam_edge.app:app