File size: 747 Bytes
24fd742 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
@echo off
echo 启动聊天应用...
echo.
echo 检查Docker是否运行...
docker --version >nul 2>&1
if %errorlevel% neq 0 (
echo 错误: Docker未安装或未运行
echo 请先安装Docker Desktop并确保其正在运行
pause
exit /b 1
)
echo Docker已就绪
echo.
echo 构建并启动服务...
docker-compose up --build -d
if %errorlevel% equ 0 (
echo.
echo ✅ 聊天应用启动成功!
echo.
echo 🌐 前端地址: http://localhost:3000
echo 🔧 后端API: http://localhost:5000
echo 📊 MongoDB: localhost:27017
echo.
echo 按任意键打开浏览器...
pause >nul
start http://localhost:3000
) else (
echo.
echo ❌ 启动失败,请检查错误信息
pause
)
|