-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_everything.sh
81 lines (66 loc) · 2 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
79
80
81
#!/bin/bash
set -e
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
# MUST SETUP ALL .env FILES FOR docker compose
./setup_env.sh
# ===================== 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
echo "BUILDING docker with docker and express";
(cd docker-sock-express-compilers/docker-ubuntu-docker-node-express; ./docker_build-all.sh)
echo "BUILDING compilers";
(cd docker-sock-express-compilers/docker-compilers; ./buildCompilers.sh)
# ===================== BUILDS END =========================
# ===================== STOP EVERYTHING =========================
echo "STOPPING containers";
./stop_everything.sh
# ===================== STOP EVERYTHING =========================
echo "Call docker-compose network";
(cd docker-compose-eco-network; ./runDetachedCompose-EcoNodes.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-sock-express-compilers/docker-http-express; docker compose up -d)
fi
echo "RUNNING express ecoservice";
(cd docker-sock-express-compilers/docker-services; docker compose up -d)
echo "RUNNING express compilers";
(cd docker-sock-express-compilers/docker-compilers; docker compose up -d)
echo "EVERYTHING has been built and running!";