forked from FINRAOS/Fidelius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservices.sh
63 lines (58 loc) · 2.49 KB
/
services.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
59
60
61
62
63
#!/bin/bash
set -e
if [[ -z "${http_proxy}" ]]; then
echo "No Proxy provided, setting http_proxy to be blank"
export http_proxy=""
fi
if [[ -z "${AWS_DIRECTORY}" ]]; then
echo "Please set AWS_DIRECTORY environment before proceeding"
exit 1;
fi
if [[ -z "${AWS_ACCOUNT_NUMBER}" ]]; then
echo "Please set AWS_ACCOUNT_NUMBER environment before proceeding"
exit 1;
fi
echo "$(tput setaf 6)"
echo "-------------------------------------------------------"
echo "| Starting Fidelius Setup |"
echo "-------------------------------------------------------"
echo "$(tput sgr0)"
docker-compose -f setup-docker-compose.yml up
ret=$(docker wait fidelius_fidelius_setup_1)
if [[ $ret -eq 1 ]]; then
echo "$(tput setaf 1)"
echo "-------------------------------------------------------"
echo "| Error encountered running Fidelius setup |"
echo "| Please fix and try again. |"
echo "-------------------------------------------------------"
echo "$(tput sgr0)"
else
echo "$(tput setaf 6)"
echo "-------------------------------------------------------"
echo "| Starting Fidelius Local Environment |"
echo "-------------------------------------------------------"
echo "$(tput sgr0)"
docker-compose -f local-docker-compose.yml up -d
result1=$(docker container logs fidelius_fidelius-service_1)
result2=$(docker container logs fidelius_fidelius_accounts_1)
while [[ $result1 != *"Started FideliusApp"* || $result2 != *"Started FakeAccountServiceApplication"* ]]; do
echo ""
echo "Waiting for containers to start to launch browser..."
sleep 5
result1=$(docker container logs fidelius_fidelius-service_1)
result2=$(docker container logs fidelius_fidelius_accounts_1)
done
open https://localhost:443
open https://localhost:444
open https://localhost:445
echo "$(tput setaf 6)"
echo "-------------------------------------------------------"
echo "| Fidelius User Endpoints |"
echo "| |"
echo "| DEV user - https://localhost:443 |"
echo "| OPS user - https://localhost:444 |"
echo "| MASTER user - https://localhost:445 |"
echo "| |"
echo "-------------------------------------------------------"
echo "$(tput sgr0)"
fi