You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#!/bin/bash
# 智能期货期权分析系统 - 快速启动脚本
echo "🚀 启动智能期货期权分析系统..."
# 检查Docker是否安装
if ! command -v docker & > /dev/null; then
echo "❌ Docker未安装, 请先安装Docker"
exit 1
fi
if ! command -v docker-compose & > /dev/null; then
echo "❌ Docker Compose未安装, 请先安装Docker Compose"
exit 1
fi
# 创建环境文件
if [ ! -f "app/server/.env" ] ; then
echo "📝 创建环境配置文件..."
cp app/server/.env.example app/server/.env
echo "⚠️ 请编辑 app/server/.env 文件,设置必要的配置"
fi
# 启动服务
echo "🐳 启动Docker服务..."
docker-compose up -d
# 等待服务启动
echo "⏳ 等待服务启动..."
sleep 10
# 检查服务状态
echo "🔍 检查服务状态..."
docker-compose ps
echo ""
echo "✅ 服务启动完成!"
echo ""
echo "📱 访问地址:"
echo " 前端应用: http://localhost"
echo " API文档: http://localhost:3000/docs"
echo ""
echo "📊 常用命令:"
echo " 查看日志: docker-compose logs -f backend"
echo " 停止服务: docker-compose down"
echo " 重启服务: docker-compose restart"
echo ""
echo "💡 提示: 首次启动可能需要下载镜像,请耐心等待"