-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompose.bat
More file actions
45 lines (38 loc) · 1.32 KB
/
compose.bat
File metadata and controls
45 lines (38 loc) · 1.32 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
@echo off
setlocal enabledelayedexpansion
echo 🐙 AscendSkip Optimized Compose Script
echo ======================================
echo [%TIME%] [1/4] Checking Podman machine...
podman machine start >nul 2>&1
echo.
echo [%TIME%] [2/4] Fast-Building Image (using Robocopy logic)...
:: Create temp context to avoid slow copy
set "TEMP_BUILD_DIR=%TEMP%\ascendskip_up_%RANDOM%"
mkdir "%TEMP_BUILD_DIR%"
mkdir "%TEMP_BUILD_DIR%\server"
mkdir "%TEMP_BUILD_DIR%\frontend"
echo - Mirroring context (skipping heavy folders)...
robocopy "server" "%TEMP_BUILD_DIR%\server" /MIR /XD .git /XF .DS_Store /MT:8 /NFL /NDL >nul
robocopy "frontend" "%TEMP_BUILD_DIR%\frontend" /MIR /XD .git dist /XF .DS_Store /MT:8 /NFL /NDL >nul
copy "Dockerfile" "%TEMP_BUILD_DIR%\" >nul
copy ".dockerignore" "%TEMP_BUILD_DIR%\" >nul
echo - Building image 'ascendskip:latest'...
pushd "%TEMP_BUILD_DIR%"
podman build --no-cache -t ascendskip:latest .
popd
rmdir /s /q "%TEMP_BUILD_DIR%"
if %ERRORLEVEL% NEQ 0 (
echo ❌ Build failed! Not starting Compose.
pause
exit /b %ERRORLEVEL%
)
echo.
echo [%TIME%] [3/4] Starting Services with Compose...
:: Using --no-build so it uses our freshly built image
podman compose up -d --no-build
echo.
echo [%TIME%] [4/4] Done! ✅
echo Check status: podman compose ps
echo Stop: podman compose down
echo.
pause