File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments