-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-dev.sh
executable file
·58 lines (49 loc) · 1.12 KB
/
run-dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
usage_string="usage: ./$(basename "$0") [OPTIONS]
Run the issuer and verifier services at localhost:7000-1 respectively.
Options:
--build Build web image before running the application (will also
re-build the base image)
--force-recreate Recreate containers
-h, --help Display help message and exit
Examples:
"
usage() { echo -n "$usage_string" 1>&2; }
DO_BUILD=false
DO_RECREATE=false
compose_args=()
while [[ $# -gt 0 ]]
do
arg="$1"
case $arg in
--build)
DO_BUILD=true
compose_args+=($arg)
shift
;;
--force-recreate)
DO_RECREATE=true
compose_args+=($arg)
shift
;;
-h|--help)
usage
exit 0
;;
*)
echo "[-] Invalid argument: $arg"
usage
exit 1
;;
esac
done
if [ ${DO_BUILD} == true ]; then
./build-base-image.sh \
--tag "local" \
--no-push
fi
docker-compose \
--env-file .env-google \
up \
$compose_args \
--remove-orphans