fix: Ensure called from the docker directory (#7689)
This commit is contained in:
parent
392511f78f
commit
475cf2fc85
|
@ -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
|
||||
|
|
|
@ -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!"
|
||||
|
|
Loading…
Reference in a new issue