forked from surajyog/nanomides
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-docker.bat
More file actions
97 lines (85 loc) · 2.38 KB
/
Copy pathstart-docker.bat
File metadata and controls
97 lines (85 loc) · 2.38 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@echo off
REM Bot Civilization Platform - Docker Startup Script (Windows)
REM For Judges and Quick Demo
echo.
echo 🤖 Bot Civilization Platform - Docker Setup
echo ============================================
echo.
REM Check if Docker is installed
docker --version >nul 2>&1
if errorlevel 1 (
echo ❌ Docker is not installed!
echo Please install Docker Desktop from: https://www.docker.com/products/docker-desktop
pause
exit /b 1
)
echo ✅ Docker is installed
echo.
REM Check if .env file exists
if not exist .env (
echo ⚠️ .env file not found!
echo.
echo Creating .env from .env.example...
copy .env.example .env
echo.
echo 📝 IMPORTANT: Edit .env file and add your Gemini API key
echo Get your free API key from: https://aistudio.google.com/app/apikey
echo.
echo Then run this script again!
pause
exit /b 1
)
REM Check if API key is set
findstr /C:"your_gemini_api_key_here" .env >nul
if not errorlevel 1 (
echo ⚠️ Gemini API key not configured!
echo.
echo 📝 Please edit .env file and replace 'your_gemini_api_key_here' with your actual API key
echo Get your free API key from: https://aistudio.google.com/app/apikey
echo.
pause
exit /b 1
)
echo ✅ Configuration file found
echo.
REM Stop any existing containers
echo 🛑 Stopping existing containers...
docker-compose down 2>nul
REM Build and start
echo 🏗️ Building Docker image (this may take a few minutes on first run)...
docker-compose build
echo.
echo 🚀 Starting Bot Civilization Platform...
docker-compose up -d
echo.
echo ⏳ Waiting for application to start (30 seconds)...
timeout /t 30 /nobreak >nul
REM Check if container is running
docker-compose ps | findstr "Up" >nul
if not errorlevel 1 (
echo.
echo ✅ SUCCESS! Bot Civilization Platform is running!
echo.
echo 🌐 Access the application:
echo Frontend: http://localhost:3000
echo API Health: http://localhost:3000/api/health
echo.
echo 🔐 Default Login:
echo Username: admin
echo Password: admin123
echo.
echo 📊 View logs:
echo docker-compose logs -f
echo.
echo 🛑 Stop application:
echo docker-compose down
echo.
echo Opening browser...
start http://localhost:3000
) else (
echo.
echo ❌ Failed to start! Check logs:
echo docker-compose logs
echo.
)
pause