fix: skip assets volume in cleandb script + add confirm prompt to cleanall (#4038)
* fix: skip assets volume in cleandb script + add confirm prompt to cleanall * fix: remove purge dangling images from cleanall script
This commit is contained in:
parent
d0e6fd62cb
commit
083732557d
|
@ -1,9 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd ..
|
read -p "Stop and remove all containers, volumes and images for this project? [y/N] " -n 1 -r
|
||||||
echo "Shutting down any instance still running and purge images..."
|
echo
|
||||||
docker compose down -v --rmi all
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
echo "Purging dangling images..."
|
then
|
||||||
docker image prune
|
cd ..
|
||||||
cd docker
|
echo "Shutting down any instance still running and purge images..."
|
||||||
echo "Done!"
|
docker compose down -v --rmi all
|
||||||
|
cd docker
|
||||||
|
echo "Done!"
|
||||||
|
fi
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "Shutting down any instance still running..."
|
|
||||||
cd ..
|
cd ..
|
||||||
docker compose down -v
|
echo "Shutting down any instance still running..."
|
||||||
|
docker compose down
|
||||||
|
echo "Removing DB volume..."
|
||||||
|
PROJNAME=$(basename $PWD)
|
||||||
|
docker volume rm -f "${PROJNAME}_mariadb-data"
|
||||||
echo "Rebuilding the DB image..."
|
echo "Rebuilding the DB image..."
|
||||||
docker compose pull db
|
docker compose pull db
|
||||||
docker compose build --no-cache db
|
docker compose build --no-cache db
|
||||||
|
|
Loading…
Reference in a new issue