Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions docker/cleanall
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

cd ..
echo "Shutting down any instance still running and purge images..."
docker compose down -v --rmi all
echo "Purging dangling images..."
docker image prune
cd docker
echo "Done!"
read -p "Stop and remove all containers, volumes and images for this project? [y/N] " -n 1 -r
Comment thread
NGPixel marked this conversation as resolved.
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
cd ..
echo "Shutting down any instance still running and purge images..."
docker compose down -v --rmi all
cd docker
echo "Done!"
fi
7 changes: 5 additions & 2 deletions docker/cleandb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash

echo "Shutting down any instance still running..."
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..."
docker compose pull db
docker compose build --no-cache db
Expand Down