fix: Ensure called from the docker directory (#7689)

This commit is contained in:
Rich Salz 2024-07-15 17:32:28 -04:00 committed by GitHub
parent 392511f78f
commit 475cf2fc85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,11 @@
#!/bin/bash
if test $(basename $PWD ) != "docker"
then
echo "Run this from the docker directory" 1>&2
exit 1
fi
read -p "Stop and remove all containers, volumes and images for this project? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
@ -7,6 +13,5 @@ then
cd ..
echo "Shutting down any instance still running and purge images..."
docker compose down -v --rmi all
cd docker
echo "Done!"
fi

View file

@ -1,5 +1,11 @@
#!/bin/bash
if test $(basename $PWD ) != "docker"
then
echo "Run this from the docker directory" 1>&2
exit 1
fi
cd ..
echo "Shutting down any instance still running..."
docker compose down
@ -9,5 +15,5 @@ docker volume rm -f "${PROJNAME}_postgresdb-data"
echo "Rebuilding the DB image..."
docker compose pull db
docker compose build --no-cache db
cd docker
echo "Done!"