forked from open-webui/open-webui
feat: implemented user confirmation for safe removal of containers and volumes in Makefile
This commit is contained in:
parent
a016171573
commit
0f6bdaa602
2 changed files with 11 additions and 1 deletions
4
Makefile
4
Makefile
|
@ -2,7 +2,9 @@ install:
|
|||
@docker-compose up -d
|
||||
|
||||
remove:
|
||||
@docker-compose down -v
|
||||
@chmod +x confirm_remove.sh
|
||||
@./confirm_remove.sh
|
||||
|
||||
|
||||
start:
|
||||
@docker-compose start
|
||||
|
|
8
confirm_remove.sh
Executable file
8
confirm_remove.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
|
||||
read ans
|
||||
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
|
||||
docker-compose down -v
|
||||
else
|
||||
echo "Operation cancelled."
|
||||
fi
|
Loading…
Reference in a new issue