Skip to content

A self-hosted media server and file management system

fix: docker volumes should not be auto pruned

aminnausinb6eb1ebe30ba
diff --git a/startDocker.bat b/startDocker.bat
index f3f69415..a1d6633d 100644
--- a/startDocker.bat
+++ b/startDocker.bat
@@ -29,7 +29,7 @@ IF /I "%~1"=="--auto-default" (
)
echo.
-call :ColorText "[STEP 1/6]" Yellow
+call :ColorText "[STEP 1/5]" Yellow
echo Verifying required files and folders...
echo.
@@ -135,7 +135,7 @@ if not exist "logs" (
echo.
rem --------------------------------------------------
-call :ColorText "[STEP 2/6] " Yellow
+call :ColorText "[STEP 2/5] " Yellow
echo Setting up user config...
echo.
@@ -295,7 +295,7 @@ IF %ERRORLEVEL% NEQ 0 (
)
echo.
-call :ColorText "[STEP 3/6] " Yellow
+call :ColorText "[STEP 3/5] " Yellow
echo Stopping and cleaning up Existing mediaServer Docker containers...
echo .
@@ -312,25 +312,13 @@ echo.
call :ColorText "[SUCCESS]" Green
echo Docker containers stopped and cleaned up.
echo.
+rem --------------------------------------------------
-call :ColorText "[STEP 4/6] " Yellow
-echo Pruning Docker volumes...
-echo.
-docker volume prune -f
-if errorlevel 1 (
- echo.
- call :ColorText "[ERROR]" Red
- echo Failed to prune Docker volumes.
- echo Please check your Docker setup and try again.
- pause
- goto :end
-)
-echo.
-call :ColorText "[SUCCESS]" Green
-echo Docker volumes pruned.
+echo Docker volumes no longer pruned...
echo.
+rem --------------------------------------------------
-call :ColorText "[STEP 5/6] " Yellow
+call :ColorText "[STEP 4/5] " Yellow
echo Pulling latest Docker images...
echo.
docker compose pull
@@ -348,7 +336,7 @@ if errorlevel 1 (
echo.
)
-call :ColorText "[STEP 6/6] " Yellow
+call :ColorText "[STEP 5/5] " Yellow
echo Building docker compose...
echo.
@@ -417,7 +405,7 @@ set arg0=%0
if [%arg0:~2,1%]==[:] pause
exit /b
-:: Function to print colored text
+REM Function to print colored text
:ColorText
set "text=%~1"
set "color=%~2"
diff --git a/startDocker.sh b/startDocker.sh
index 71307084..6fe4bf1b 100644
--- a/startDocker.sh
+++ b/startDocker.sh
@@ -39,7 +39,7 @@ fi
echo
# --- End CI/CD check ---
-echo -e "${YELLOW}[STEP 1/6]${RESET} Verifying required files and folders..."
+echo -e "${YELLOW}[STEP 1/5]${RESET} Verifying required files and folders..."
echo
# Check for docker-compose.yaml
@@ -121,7 +121,7 @@ else
fi
echo
-echo -e "${YELLOW}[STEP 2/6]${RESET} Setting up user config..."
+echo -e "${YELLOW}[STEP 2/5]${RESET} Setting up user config..."
echo
# Get existing APP_HOST and APP_PORT or use defaults
@@ -180,7 +180,7 @@ else
fi
echo
-echo -e "${YELLOW}[STEP 3/6]${RESET} Stopping and cleaning up Existing mediaServer Docker containers..."
+echo -e "${YELLOW}[STEP 3/5]${RESET} Stopping and cleaning up Existing mediaServer Docker containers..."
echo
docker compose down
@@ -192,8 +192,8 @@ fi
echo -e "${GREEN}[SUCCESS]${RESET} Docker containers stopped and cleaned up."
echo
-echo -e "${YELLOW}[STEP 4/6]${RESET} Pruning Docker volumes..."
-echo
+# echo -e "${YELLOW}[STEP 4/5]${RESET} Pruning Docker volumes..."
+# echo
# docker volume prune -f
# if [[ $? -ne 0 ]]; then
# echo -e "${RED}[ERROR]${RESET} Failed to prune Docker volumes."
@@ -203,7 +203,7 @@ echo
# echo -e "${GREEN}[SUCCESS]${RESET} Docker volumes pruned."
# echo
-echo -e "${YELLOW}[STEP 5/6]${RESET} Pulling latest Docker images..."
+echo -e "${YELLOW}[STEP 4/5]${RESET} Pulling latest Docker images..."
echo
docker compose pull
if [[ $? -ne 0 ]]; then
@@ -215,7 +215,7 @@ else
echo
fi
-echo -e "${YELLOW}[STEP 6/6]${RESET} Building docker compose..."
+echo -e "${YELLOW}[STEP 5/5]${RESET} Building docker compose..."
echo
# Check for shared docker volume