Skip to content

Commit 5645581

Browse files
committed
Mirror compose-rebuild file
1 parent 098380a commit 5645581

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

compose-full-rebuild.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
echo -e "\033[0mThis script will:"
4+
echo -e "- \033[1;31mDelete\033[0m the current compose build (if it exists)"
5+
echo -e "- \033[1;31mDelete\033[0m any non-referenced inactive compose builds (if they exist)"
6+
echo -e "- \033[1;31mDelete\033[0m \033[0;36m./data\033[0m, the PostgreSQL data folder (if it exists)"
7+
echo -e "- \033[1;34mBuild\033[0m this repo state's compose build, disabling cache mode and obtaining images as necessary."
8+
echo -e "- \033[1;32mRun\033[0m this compose build in an attached state"
9+
echo -e "\nIf you are VERY sure that this is what you want to do, please type:\n'\033[0;37myes pls\033[0m'"
10+
11+
read -p "> " -r
12+
echo
13+
if [[ $REPLY = "yes pls" ]]
14+
then
15+
docker-compose down &&
16+
docker-compose rm -f &&
17+
rm -rf data/ &&
18+
docker-compose build --no-cache &&
19+
docker-compose up "$@"
20+
else
21+
echo "Response did not match pattern, aborting."
22+
exit 2
23+
fi

0 commit comments

Comments
 (0)