fix: Ensure called from the docker directory (#7689)
This commit is contained in:
parent
392511f78f
commit
475cf2fc85
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/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
|
read -p "Stop and remove all containers, volumes and images for this project? [y/N] " -n 1 -r
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
@ -7,6 +13,5 @@ then
|
||||||
cd ..
|
cd ..
|
||||||
echo "Shutting down any instance still running and purge images..."
|
echo "Shutting down any instance still running and purge images..."
|
||||||
docker compose down -v --rmi all
|
docker compose down -v --rmi all
|
||||||
cd docker
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if test $(basename $PWD ) != "docker"
|
||||||
|
then
|
||||||
|
echo "Run this from the docker directory" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
echo "Shutting down any instance still running..."
|
echo "Shutting down any instance still running..."
|
||||||
docker compose down
|
docker compose down
|
||||||
|
@ -9,5 +15,5 @@ docker volume rm -f "${PROJNAME}_postgresdb-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
|
||||||
cd docker
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
Loading…
Reference in a new issue