-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
118 lines (92 loc) · 4.67 KB
/
Dockerfile
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
FROM metacell/java-virgo-maven:development
LABEL maintainer="[email protected]"
ARG targetBranch=development
ARG originBranch=development
ARG defaultBranch=development
VOLUME /tmp/error
#SET TAG/BRANCH to use:
ARG geppettoRelease=vfb_20200604_a
ARG geppettoModelRelease=vfb_20200604_a
ARG geppettoCoreRelease=VFBv2.2.0
ARG geppettoSimulationRelease=VFBv2.1.0.2
ARG geppettoDatasourceRelease=passingSOLR
ARG geppettoModelSwcRelease=v1.0.1
ARG geppettoFrontendRelease=VFBv2.1.0.3
ARG geppettoClientRelease=VFBv2.2.5
ARG ukAcVfbGeppettoRelease=v2.2.4.3
ARG mvnOpt="-Dhttps.protocols=TLSv1.2 -DskipTests --quiet -Pmaster"
ARG VFB_PDB_SERVER_ARG=http://pdb.v4.virtualflybrain.org
ARG VFB_TREE_PDB_SERVER_ARG=https://pdb.v4.virtualflybrain.org
ARG VFB_OWL_SERVER_ARG=http://owl.virtualflybrain.org/kbs/vfb/
ARG VFB_R_SERVER_ARG=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast
ARG SOLR_SERVER_ARG=https://solr.virtualflybrain.org/solr/ontology/select
ARG googleAnalyticsSiteCode_ARG=G-K7DDZVVXM7
ENV MAXSIZE=2G
ARG finalBuild=false
ENV USESSL=${finalBuild}
ARG build_type=production
ENV VFB_PDB_SERVER=${VFB_PDB_SERVER_ARG}
ENV VFB_TREE_PDB_SERVER=${VFB_TREE_PDB_SERVER_ARG}
ENV VFB_OWL_SERVER=${VFB_OWL_SERVER_ARG}
ENV VFB_R_SERVER=${VFB_R_SERVER_ARG}
ENV SOLR_SERVER=${SOLR_SERVER_ARG}
ENV googleAnalyticsSiteCode=${googleAnalyticsSiteCode_ARG}
ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
RUN /bin/echo -e "\e[1;35mORIGIN BRANCH ------------ $originBranch\e[0m" &&\
/bin/echo -e "\e[1;35mTARGET BRANCH ------------ $targetBranch\e[0m" &&\
/bin/echo -e "\e[1;35mDEFAULT BRANCH ------------ $defaultBranch\e[0m"
# get geppetto
RUN mkdir -p workspace &&\
cd workspace &&\
git clone http://github.com/openworm/org.geppetto.git -q -b "${geppettoRelease}" --single-branch
WORKDIR $HOME/workspace
RUN git clone https://github.com/openworm/org.geppetto.model.git -q -b "${geppettoModelRelease}" --single-branch &&\
cd org.geppetto.model &&\
/bin/echo -e "\e[96mMaven install org.geppetto.model\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/openworm/org.geppetto.core.git -q -b "${geppettoCoreRelease}" --single-branch &&\
cd org.geppetto.core &&\
/bin/echo -e "\e[96mMaven install org.geppetto.core\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/openworm/org.geppetto.simulation.git -q -b "${geppettoSimulationRelease}" --single-branch &&\
cd org.geppetto.simulation &&\
/bin/echo -e "\e[96mMaven install org.geppetto.simulation\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/openworm/org.geppetto.datasources.git -q -b "${geppettoDatasourceRelease}" --single-branch &&\
cd org.geppetto.datasources &&\
/bin/echo -e "\e[96mMaven install org.geppetto.datasources\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/VirtualFlyBrain/uk.ac.vfb.geppetto.git -q -b "${ukAcVfbGeppettoRelease}" --single-branch
RUN export DEBUG=false; if test "$build_type" = "development" ; then export DEBUG=true; fi && \
echo "DEBUG=$DEBUG" && \
/bin/grep -rls "Boolean debug=" $HOME/workspace/uk.ac.vfb.geppetto/src/ | xargs /bin/sed -i "s@Boolean debug=.*;@Boolean debug=$DEBUG;@g" &&\
/bin/grep -rls "Boolean debug=" $HOME/workspace/uk.ac.vfb.geppetto/src/ | xargs cat | grep 'Boolean debug'
RUN cd uk.ac.vfb.geppetto &&\
/bin/echo -e "\e[96mMaven install uk.ac.vfb.geppetto\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/openworm/org.geppetto.model.swc.git -q -b "${geppettoModelSwcRelease}" --single-branch &&\
cd org.geppetto.model.swc &&\
/bin/echo -e "\e[96mMaven install org.geppetto.model.swc\e[0m" &&\
mvn ${mvnOpt} install &&\
rm -rf src
RUN git clone https://github.com/openworm/org.geppetto.frontend.git -q -b "${geppettoFrontendRelease}" --single-branch
RUN cd $HOME/workspace/org.geppetto.frontend/src/main &&\
git clone https://github.com/VirtualFlyBrain/geppetto-vfb.git -q -b "${targetBranch}" --single-branch &&\
mv geppetto-vfb webapp
RUN cd $HOME/workspace/org.geppetto.frontend/src/main/webapp &&\
$HOME/rename.sh https://github.com/openworm/geppetto-client.git "${geppettoClientRelease}" "${geppettoClientRelease}" "${geppettoClientRelease}"
RUN echo "package.json" && cat $HOME/workspace/org.geppetto.frontend/src/main/webapp/package.json
COPY dockerFiles/geppetto.plan $HOME/workspace/org.geppetto/geppetto.plan
COPY dockerFiles/config.json $HOME/workspace/org.geppetto/utilities/source_setup/config.json
COPY dockerFiles/startup.sh /
RUN if test ! "${build_type}" = "development" ; then /startup.sh || true; fi
WORKDIR $HOME
RUN mkdir -p $SERVER_HOME/./repository/usr
EXPOSE 8080
EXPOSE 8443
CMD [ "/bin/bash", "-c", "/startup.sh" ]