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 (66 loc) · 2.02 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
# ===================== BUILDS ===============================
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
# BUILDING AND RUNNING EXPRESS FOR FRONT-END ONLY
if ((!$DISABLE_WEB)); then
echo "BUILDING docker with node express for front-end only";
(cd docker-http-express; ./docker_build.sh)
fi
echo "BUILDING docker with docker and express";
(cd docker-sock-express-compilers/docker-ubuntu-docker-node-express; ./docker_build.sh)
# ===================== BUILDS END =========================
echo "TRYING TO STOP all eco related services - including docker services with express servers";
./stopEco_network.sh
./runEco_network.sh
# BUILDING AND RUNNING EXPRESS FOR FRONT-END ONLY
if ((!$DISABLE_WEB)); then
echo "RUNNING docker with node express for front-end only";
(cd docker-http-express; docker-compose up -d)
fi
echo "RUNNING express compilers";
(cd docker-sock-express-compilers/docker-compilers; docker-compose up -d)
echo "RUNNING express ecoservice";
(cd docker-sock-express-compilers/docker-services; docker-compose up -d)
echo "EVERYTHING has been built and running!";