Skip to content

Commit 475cf2f

Browse files
authored
fix: Ensure called from the docker directory (#7689)
1 parent 392511f commit 475cf2f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docker/cleanall

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#!/bin/bash
22

3+
if test $(basename $PWD ) != "docker"
4+
then
5+
echo "Run this from the docker directory" 1>&2
6+
exit 1
7+
fi
8+
39
read -p "Stop and remove all containers, volumes and images for this project? [y/N] " -n 1 -r
410
echo
511
if [[ $REPLY =~ ^[Yy]$ ]]
612
then
713
cd ..
814
echo "Shutting down any instance still running and purge images..."
915
docker compose down -v --rmi all
10-
cd docker
1116
echo "Done!"
1217
fi

docker/cleandb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
22

3+
if test $(basename $PWD ) != "docker"
4+
then
5+
echo "Run this from the docker directory" 1>&2
6+
exit 1
7+
fi
8+
39
cd ..
410
echo "Shutting down any instance still running..."
511
docker compose down
@@ -9,5 +15,5 @@ docker volume rm -f "${PROJNAME}_postgresdb-data"
915
echo "Rebuilding the DB image..."
1016
docker compose pull db
1117
docker compose build --no-cache db
12-
cd docker
18+
1319
echo "Done!"

0 commit comments

Comments
 (0)