-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.bat
More file actions
60 lines (50 loc) · 1.64 KB
/
run.bat
File metadata and controls
60 lines (50 loc) · 1.64 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
@echo off
setlocal
echo === Manga Translator - Starting all services ===
echo.
:: Check Docker is running
docker info >nul 2>&1
if errorlevel 1 (
echo [ERROR] Docker is not running. Please start Docker Desktop first.
pause
exit /b 1
)
:: Create storage directories if not present
echo Creating storage directories if needed...
if not exist "storage\uploads" mkdir "storage\uploads"
if not exist "storage\originals" mkdir "storage\originals"
if not exist "storage\translated" mkdir "storage\translated"
if not exist "storage\temp" mkdir "storage\temp"
echo [OK] Storage directories ready.
echo.
:: Start Docker services (infra + api + frontend)
echo [1/2] Starting Docker services...
docker compose up -d --build
if errorlevel 1 (
echo [ERROR] Failed to start Docker services.
pause
exit /b 1
)
echo [OK] Docker services started.
echo.
:: Wait a moment for services to be healthy
echo Waiting for services to be ready...
timeout /t 5 /nobreak >nul
:: Start the Go worker in a new window
echo [2/2] Starting Go worker (host)...
start "Manga Translator - Worker" cmd /k "cd /d "%~dp0backend-api" && go run ./cmd/api --mode=worker"
:: Open browser after a short delay to let the frontend finish starting
timeout /t 3 /nobreak >nul
start "" "http://localhost:3000"
echo.
echo === All services started ===
echo Frontend: http://localhost:3000
echo Backend API: http://localhost:8080
echo Asynq Monitor: http://localhost:8081
echo.
echo The worker is running in a separate window.
echo Close this window or press Ctrl+C to stop Docker services.
echo.
:: Keep window open and show docker logs
docker compose logs -f --tail=20
endlocal