37 lines
385 B
Batchfile
37 lines
385 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
set reset_data=0
|
|
|
|
if "%~1"=="" (
|
|
goto end
|
|
)
|
|
|
|
:checkArguments
|
|
if "%~1"=="" (
|
|
goto end
|
|
)
|
|
if "%~1"=="--reset-data" (
|
|
set reset_data=1
|
|
)
|
|
if "%~1"=="-r" (
|
|
set reset_data=1
|
|
)
|
|
shift
|
|
goto checkArguments
|
|
|
|
:end
|
|
|
|
@echo on
|
|
docker compose down
|
|
|
|
@echo off
|
|
if "%reset_data%"=="1" (
|
|
rmdir /s /q .\pg_data
|
|
echo.
|
|
echo volume removed
|
|
echo.
|
|
)
|
|
|
|
endlocal
|