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.
buffer_platform/deploy.bat

56 lines
1.2 KiB

This file contains ambiguous Unicode characters!

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.

@echo off
chcp 65001 >nul
echo ====================================
echo 期货智析平台 - Docker 部署脚本
echo ====================================
echo.
echo [1/4] 检查Docker环境...
docker --version >nul 2>&1
if errorlevel 1 (
echo [错误] 未检测到Docker请先安装Docker Desktop
pause
exit /b 1
)
echo [√] Docker已安装
echo.
echo [2/4] 停止并清理旧容器...
docker-compose down
echo [√] 清理完成
echo.
echo [3/4] 构建Docker镜像...
docker-compose build --no-cache
if errorlevel 1 (
echo [错误] 镜像构建失败
pause
exit /b 1
)
echo [√] 镜像构建完成
echo.
echo [4/4] 启动Docker容器...
docker-compose up -d
if errorlevel 1 (
echo [错误] 容器启动失败
pause
exit /b 1
)
echo.
echo ====================================
echo 部署完成!
echo ====================================
echo.
echo 访问地址: http://localhost:9600
echo 品种分析: http://localhost:9600/futures-analysis
echo API文档: http://localhost:9600/docs
echo 健康检查: http://localhost:9600/api/v1/health
echo.
echo 查看日志: docker-compose logs -f
echo 停止服务: docker-compose down
echo 重启服务: docker-compose restart
echo.
pause