-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart.sh
executable file
·32 lines (24 loc) · 1.11 KB
/
start.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
#!/bin/bash
cat <<"EOF"
--------------------------------------------------------------------------------
.-. .-..----..---. .--. .-. .-..-. .----..--. .----. .----. .-. .---.
| `.' || {_ {_ _}/ {} \ | {_} || | | {_ / {} \ | {} }| {} }| |/ ___)
| |\ /| || {__ | | / /\ \| { } || `--. | | / /\ \| {} }| .-. \| |\ )
`-' ` `-'`----' `-' `-' `-'`-' `-'`----' `-' `-' `-'`----' `-' `-'`-' `---'
-- REST API --------------------------------------------------------------------
>> https://github.com/otaris/MF-REST-API
EOF
if [ "$EUID" -ne 0 ]
then echo "[-] MetaHL Fabric setup needs to be run as root"
exit
fi
while read LINE
do export $LINE
done < mf.env
export MF_HOST=$(ip addr show | grep docker | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | awk -F'inet ' '{ print $2 }')
echo "[+] Hyperledger Fabric Host is set to ${MF_HOST}"
echo "[+] Generating configs"
./scripts/generate_application-yml.sh $PWD/templates/example/application.yml
./scripts/generate_connection-json.sh $PWD/templates/example/connection.json
echo "[+] Starting docker-compose"
sudo docker-compose up --build