forked from hsliuping/TradingAgents-CN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_debug_services.bat
More file actions
69 lines (59 loc) · 1.75 KB
/
start_debug_services.bat
File metadata and controls
69 lines (59 loc) · 1.75 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
echo ========================================
echo Starting Debug MongoDB and Redis
echo ========================================
echo Checking Docker...
docker version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Docker not running
pause
exit /b 1
)
echo Cleaning up existing containers...
docker stop tradingagents-mongodb tradingagents-redis 2>nul
docker rm tradingagents-mongodb tradingagents-redis 2>nul
echo Starting MongoDB on port 27017...
docker run -d ^
--name tradingagents-mongodb ^
-p 27017:27017 ^
-e MONGO_INITDB_ROOT_USERNAME=admin ^
-e MONGO_INITDB_ROOT_PASSWORD=tradingagents123 ^
-e MONGO_INITDB_DATABASE=tradingagents ^
--restart unless-stopped ^
mongo:4.4
if %errorlevel% equ 0 (
echo [OK] MongoDB started successfully
) else (
echo [ERROR] MongoDB failed to start
)
echo Starting Redis on port 6379...
docker run -d ^
--name tradingagents-redis ^
-p 6379:6379 ^
--restart unless-stopped ^
redis:latest redis-server --appendonly yes --requirepass tradingagents123
if %errorlevel% equ 0 (
echo [OK] Redis started successfully
) else (
echo [ERROR] Redis failed to start
)
echo Waiting 10 seconds for services to start...
timeout /t 10 /nobreak >nul
echo.
echo Service Status:
docker ps --filter "name=tradingagents-" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo.
echo ========================================
echo Debug Services Started!
echo ========================================
echo MongoDB: localhost:27017
echo Username: admin
echo Password: tradingagents123
echo Database: tradingagents
echo.
echo Redis: localhost:6379
echo Password: tradingagents123
echo.
echo To stop services: docker stop tradingagents-mongodb tradingagents-redis
echo.
pause