stock-ai-agent/backend/start.sh
2026-04-25 13:20:28 +08:00

34 lines
758 B
Bash

#!/bin/bash
set -e
echo "================================"
echo "Crypto Agent Backend"
echo "================================"
echo ""
if [ ! -f "../.env" ] && [ ! -f ".env" ]; then
echo "❌ 未找到 .env 配置文件"
exit 1
fi
if [ ! -d "venv" ]; then
echo "❌ 未找到 backend/venv"
exit 1
fi
source venv/bin/activate
python -c "
from app.config import get_settings
settings = get_settings()
print(f' DeepSeek Key: {'已配置' if settings.deepseek_api_key else '未配置'}')
print(f' 智谱AI Key: {'已配置' if settings.zhipuai_api_key else '未配置'}')
print(f' 数据库: {settings.database_url}')
print(f' 监听地址: {settings.api_host}:{settings.api_port}')
"
echo ""
echo "启动服务..."
python -m app.main