-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
90 lines (77 loc) · 2.07 KB
/
start.bat
File metadata and controls
90 lines (77 loc) · 2.07 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
@echo off
echo ========================================
echo WeatherNote Backend Quick Start
echo ========================================
echo.
REM Check if Docker is installed
docker --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Docker is not installed!
echo Please install Docker Desktop from: https://www.docker.com/products/docker-desktop
pause
exit /b 1
)
echo [INFO] Docker is installed
echo.
REM Check if docker-compose is available
docker-compose --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] docker-compose is not available!
echo Please ensure Docker Desktop is running
pause
exit /b 1
)
echo [INFO] docker-compose is available
echo.
REM Navigate to backend directory
cd /d "%~dp0"
REM Check if .env exists, if not copy from example
if not exist .env (
echo [INFO] Creating .env file from .env.example
copy .env.example .env
echo [SUCCESS] .env file created. You can edit it if needed.
echo.
) else (
echo [INFO] .env file already exists
echo.
)
echo [INFO] Starting services with Docker Compose...
echo.
REM Start services
docker-compose up -d
if errorlevel 1 (
echo [ERROR] Failed to start services
pause
exit /b 1
)
echo.
echo ========================================
echo Services Started Successfully!
echo ========================================
echo.
echo Redis: http://localhost:6379
echo Backend API: http://localhost:8080
echo Health Check: http://localhost:8080/health
echo.
echo To view logs:
echo docker-compose logs -f
echo.
echo To stop services:
echo docker-compose down
echo.
REM Wait 3 seconds for services to start
timeout /t 3 /nobreak >nul
REM Test health endpoint
echo [INFO] Testing health endpoint...
curl -s http://localhost:8080/health >nul 2>&1
if errorlevel 1 (
echo [WARNING] Health check failed. Services may still be starting...
echo Wait a few seconds and try: curl http://localhost:8080/health
) else (
echo [SUCCESS] Backend is healthy!
echo.
echo Test API:
echo curl "http://localhost:8080/api/v1/weather?lat=40.7&lon=-74.0"
)
echo.
pause