Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
0f6bdaa6
Commit
0f6bdaa6
authored
Feb 24, 2024
by
Patrice-Gaudicheau
Browse files
feat: implemented user confirmation for safe removal of containers and volumes in Makefile
parent
a0161715
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
Makefile
Makefile
+3
-1
confirm_remove.sh
confirm_remove.sh
+8
-0
No files found.
Makefile
View file @
0f6bdaa6
...
...
@@ -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
...
...
confirm_remove.sh
0 → 100755
View file @
0f6bdaa6
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment