-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild_all.sh
97 lines (86 loc) · 3.68 KB
/
build_all.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#! /bin/bash
# simple script to build ALL of the images necessary to run Reactome in docker containers.
#TODO: get the Release version as well as Neo4j username/password from a file.
RELEASE_VERSION=Release77
NEO4J_USER=neo4j
NEO4J_PASSWORD=n304j
set -e
# the MySQL database is the first piece that must be built - solr, neo4j, analysis-core,
# diagrams generator, fireworks generator depend on it.
echo "Building the MySQL image."
cd ./mysql
docker build -t reactome/reactome-mysql:$RELEASE_VERSION -f mysql.dockerfile .
# Next, we need to create the graph database.
cd ../neo4j
echo "Building the graph database."
docker build -t reactome/graphdb:$RELEASE_VERSION \
--build-arg RELEASE_VERSION=$RELEASE_VERSION \
--build-arg NEO4J_USER=$NEO4J_USER \
--build-arg NEO4J_PASSWORD=$NEO4J_PASSWORD \
-f neo4j_generated_from_mysql.dockerfile .
# Now, we can build everyting else!
cd ../analysis-core
echo "Generating the analysis.bin file."
docker build -t reactome/analysis-core \
--build-arg RELEASE_VERSION=$RELEASE_VERSION \
--build-arg NEO4J_USER=$NEO4J_USER \
--build-arg NEO4J_PASSWORD=$NEO4J_PASSWORD \
-f analysis-core.dockerfile .
cd ../diagram-generator
echo "Generating the diagram JSON files."
docker build -t reactome/diagram-generator \
--build-arg RELEASE_VERSION=$RELEASE_VERSION \
--build-arg NEO4J_USER=$NEO4J_USER \
--build-arg NEO4J_PASSWORD=$NEO4J_PASSWORD \
-f diagram-generator.dockerfile .
cd ../fireworks-generator
echo "Generating the fireworks files."
docker build -t reactome/fireworks-generator \
--build-arg RELEASE_VERSION=$RELEASE_VERSION \
--build-arg NEO4J_USER=$NEO4J_USER \
--build-arg NEO4J_PASSWORD=$NEO4J_PASSWORD \
-f fireworks-generator.dockerfile .
# Build all of the Java web applications.
# Right now, we always build from master because no repos are have release tags.
# Hopefully that will change in the future...
# $ANALYSIS_SERVICE_VERSION=
cd ../tomcat
echo "Building Java applications!"
echo "Building AnalysisService"
docker build -t reactome/analysisservice -f AnalysisService.dockerfile .
echo "Building ContentService"
docker build -t reactome/contentservice -f ContentService.dockerfile .
echo "Building data-content"
docker build -t reactome/datacontent -f data-content.dockerfile .
echo "Building DiagramJs"
docker build -t reactome/diagramjs -f DiagramJs.dockerfile .
echo "Building FireworksJs"
docker build -t reactome/fireworksjs -f FireworksJs.dockerfile .
echo "Building PathwayBrowser"
docker build -t reactome/pathwaybrowser -f PathwayBrowser.dockerfile .
echo "Building ReactomeRESTfulAPI"
docker build -t reactome/reactomerestfulapi -f ReactomeRESTfulAPI.dockerfile .
echo "Building experiments-digester"
docker build -t reactome/experiments-digester -f ExperimentDigester.dockerfile .
# Finally, we will build the solr index.
cd ../solr
echo "Building the Solr index"
docker build -t reactome/solr:$RELEASE_VERSION -f index-builder.dockerfile .
# Let's display what was built.
docker images | grep "reactome/"
echo "Building tomcat image"
cd ../tomcat
docker build -t reactome/tomcat -f tomcat.dockerfile .
cd ..
echo "Building remaining joomla-sites image"
docker-compose build joomla-sites
echo "Building MySQL database for Joomla"
docker-compose build mysql-for-joomla
# need to set up the logs for solr (has problems if you don't make it writable on the outside, first)
mkdir -p ./logs/solr
chmod a+rw ./logs/solr
echo "All done. Reactome images:"
# Let's display what was built.
docker images | grep "reactome/"
echo -e "\nAll finished!\nYou can run Reactom by executing 'docker-compose up'. To shut down, run 'docker-compose down -v' (the -v cleans up shared named volumes, important if you are doing development work on a component that populates those volumes)"
set +e