forked from NeoResearch/neocompiler-eco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_everything.sh
executable file
·78 lines (68 loc) · 1.9 KB
/
build_everything.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#[[ `docker-compose --version | awk '{print $3}'` == "1.19.0," ]] && echo "docker-compose is ok: 1.19.0" || echo "ERROR: DOCKER COMPOSE VERSION SHOULD BE 1.19.0!"
set -e
source .env
function usage {
echo "Usage: $0 [--no-build] [--dev] [--no-web]"
}
DISABLE_BUILD=0
DISABLE_WEB=0
DEV_MODE=0
SERVER_MODE=0
while [[ "$#" > 0 ]]; do case $1 in
-h)
usage
exit 0
;;
--no-build)
echo "PARAMETER DISABLE_BUILD actived.";
DISABLE_BUILD=1
shift
;;
--dev)
DEV_MODE=1
shift
;;
--no-web)
DISABLE_WEB=1
shift
;;
*)
usage
exit 1
;;
esac;
done
if ((!$DISABLE_BUILD)); then
if (($DEV_MODE)); then
echo "BUILDING docker-neo-csharp-node with modified neo-cli (DEV MODE)";
(cd docker-neo-csharp-node; ./docker_build.sh --neo-cli neo-cli-built.zip)
else
echo "BUILDING docker-neo-csharp-node (with default neo-cli)";
(cd docker-neo-csharp-node; ./docker_build.sh)
fi
fi
if (($NEO_SCAN)); then
echo "STOPPPING/BUILDING/RUNNING Docker-compose with a set of components: [4 neo-cli CN + 1RPC watchonly], [neoscan full & postgress]";
./stopEco_network.sh
echo "BUILDING using NEO-SCAN";
./runEco_network.sh
else
echo "STOPPPING/BUILDING/RUNNING Docker-compose with a set of components: [4 neo-cli CN + 1RPC watchonly]";
./stopEco_network.sh
echo "BUILDING minimal version";
./runEco_network.sh
fi
echo "BUILDING compilers";
./buildCompilers.sh
echo "TRYING TO STOP express front-end";
(cd docker-http-express; docker-compose down)
# BUILDING AND RUNNING EXPRESS FOR FRONT-END ONLY
if ((!$DISABLE_WEB)); then
echo "BUILDING front-end";
(cd docker-http-express; ./docker_build.sh)
echo "RUNNING front-end";
(cd docker-http-express; docker-compose up -d)
fi
echo "RUNNING express servers: compilers and ecoservices";
(cd express-servers; ./startAllExpressNohup.sh)