├── analysis-core ├── .gitignore ├── .dockerignore ├── entrypoint.sh ├── README.md ├── analysis-core.dockerfile └── wait-for.sh ├── tomcat ├── .dockerignore ├── .gitignore ├── java-build-mounts │ ├── ant-javafx.jar │ ├── junit-4.12.jar │ ├── ReactomeJar.xml │ ├── JavaBuildPackaging.xml │ ├── deprecated │ │ └── AnalysisTools-Service-web.xml │ ├── applicationContext.xml │ └── AnalysisService_mvc-dispatcher-servlet.xml ├── properties │ ├── data-content.ogm.properties │ ├── content-service.ogm.properties │ ├── data-content.service.properties │ ├── content-service.service.properties │ ├── analysis-service.service.properties │ └── RESTfulAPI_application-context.xml ├── manager.xml ├── rewrite.config ├── tomcat-manager.xml ├── DiagramJs.dockerfile ├── FireworksJs.dockerfile ├── PathwayBrowser.dockerfile ├── ExperimentDigester.dockerfile ├── README.md ├── ContentService.dockerfile ├── AnalysisService.dockerfile ├── data-content.dockerfile ├── tomcat-users.xml ├── ReactomeRESTfulAPI.dockerfile └── tomcat.dockerfile ├── neo4j ├── .dockerignore ├── conf │ └── neo4j.conf ├── generate_graphdb.sh ├── README.md ├── neo4j-init.sh ├── wait-for.sh ├── neo4j_stand-alone.dockerfile └── neo4j_generated_from_mysql.dockerfile ├── stand-alone-content-service ├── .dockerignore ├── entrypoint.sh ├── README.md ├── wait-for.sh ├── content-service.dockerfile └── content-service-maven-settings.xml ├── joomla ├── cgi.load ├── proxy.load ├── .gitignore ├── proxy_http.load ├── Secrets.pm ├── htaccess ├── README.md ├── 000-default.conf ├── wait-for.sh ├── 000-default-common.conf ├── joomla.dockerfile ├── cgi-modules │ └── GKB │ │ ├── URLMaker.pm │ │ ├── FrontPage3.pm │ │ └── Utils │ │ └── InstructionLibrary.pm └── configuration.php ├── documentation-images ├── solr.png ├── joomla.png ├── tomcat.png ├── MySQL_DBs.png ├── neo4j-db.png ├── all-services.png ├── mysql-for-tomcat.png ├── tomcat_and_joomla.png ├── wordpress-sites.png ├── build-dependencies.png ├── mysql-for-wordpress.png └── all-services-abstract-view.png ├── .gitmodules ├── neo4j.env ├── fireworks-generator ├── README.md ├── run_fireworks_generator.sh ├── fireworks-generator.dockerfile └── wait-for.sh ├── diagram-generator ├── README.md ├── generate_diagrams.sh ├── wait-for.sh └── diagram-generator.dockerfile ├── joomla.env ├── solr ├── solr-security.json ├── README.md ├── get_icon_xml_files.sh ├── build_solr_index.sh ├── wait-for.sh └── index-builder.dockerfile ├── deprecated ├── get_fireworks.sh └── prereqs-ubuntu.sh ├── .gitignore ├── tomcat.env ├── .env ├── stand-alone-analysis-service ├── entrypoint.sh ├── README.md ├── wait-for.sh ├── analysis-service-maven-settings.xml └── analysis-service.dockerfile ├── pathway-browser ├── entrypoint.sh ├── README.md ├── wait-for.sh ├── analysis-service-maven-settings.xml └── pathway-browser.dockerfile ├── mysql ├── init_db.sh ├── README.md ├── init.sh ├── mysql.dockerfile └── wait-for.sh ├── wait-for.sh ├── prereqs-ubuntu.sh ├── content-service.jenkinsfile ├── test_standalone_analysis_service.sh ├── docker-compose.yml ├── test_standalone_content_service.sh ├── all-services.jenkinsfile ├── analysis-service.jenkinsfile └── README.md /analysis-core/.gitignore: -------------------------------------------------------------------------------- 1 | *.graphdb.* 2 | -------------------------------------------------------------------------------- /analysis-core/.dockerignore: -------------------------------------------------------------------------------- 1 | reactome.graphdb* 2 | -------------------------------------------------------------------------------- /tomcat/.dockerignore: -------------------------------------------------------------------------------- 1 | analysis-service/results 2 | -------------------------------------------------------------------------------- /neo4j/.dockerignore: -------------------------------------------------------------------------------- 1 | data/* 2 | !data/reactome.*.tgz 3 | -------------------------------------------------------------------------------- /stand-alone-content-service/.dockerignore: -------------------------------------------------------------------------------- 1 | *graphdb* 2 | -------------------------------------------------------------------------------- /tomcat/.gitignore: -------------------------------------------------------------------------------- 1 | ./logs/* 2 | ./webapps/* 3 | webapps 4 | -------------------------------------------------------------------------------- /joomla/cgi.load: -------------------------------------------------------------------------------- 1 | LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so 2 | -------------------------------------------------------------------------------- /joomla/proxy.load: -------------------------------------------------------------------------------- 1 | LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so 2 | -------------------------------------------------------------------------------- /joomla/.gitignore: -------------------------------------------------------------------------------- 1 | reactome-wordpress-files/* 2 | reactome-joomla-files/* 3 | data-dir 4 | -------------------------------------------------------------------------------- /documentation-images/solr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/solr.png -------------------------------------------------------------------------------- /documentation-images/joomla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/joomla.png -------------------------------------------------------------------------------- /documentation-images/tomcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/tomcat.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "joomla/Website"] 2 | path = joomla/Website 3 | url = https://github.com/reactome/Website.git 4 | -------------------------------------------------------------------------------- /documentation-images/MySQL_DBs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/MySQL_DBs.png -------------------------------------------------------------------------------- /documentation-images/neo4j-db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/neo4j-db.png -------------------------------------------------------------------------------- /joomla/proxy_http.load: -------------------------------------------------------------------------------- 1 | # Depends: proxy 2 | LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so 3 | -------------------------------------------------------------------------------- /neo4j.env: -------------------------------------------------------------------------------- 1 | EXTENSION_SCRIPT=/data/neo4j-init.sh 2 | NEO4J_USER=neo4j 3 | NEO4J_PASSWORD=n304j 4 | NEO4J_AUTH=neo4j/n304j 5 | -------------------------------------------------------------------------------- /documentation-images/all-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/all-services.png -------------------------------------------------------------------------------- /tomcat/java-build-mounts/ant-javafx.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/tomcat/java-build-mounts/ant-javafx.jar -------------------------------------------------------------------------------- /tomcat/java-build-mounts/junit-4.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/tomcat/java-build-mounts/junit-4.12.jar -------------------------------------------------------------------------------- /documentation-images/mysql-for-tomcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/mysql-for-tomcat.png -------------------------------------------------------------------------------- /documentation-images/tomcat_and_joomla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/tomcat_and_joomla.png -------------------------------------------------------------------------------- /documentation-images/wordpress-sites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/wordpress-sites.png -------------------------------------------------------------------------------- /documentation-images/build-dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/build-dependencies.png -------------------------------------------------------------------------------- /documentation-images/mysql-for-wordpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/mysql-for-wordpress.png -------------------------------------------------------------------------------- /tomcat/properties/data-content.ogm.properties: -------------------------------------------------------------------------------- 1 | driver=org.neo4j.ogm.drivers.http.driver.HttpDriver 2 | URI=http://neo4j:n304j@neo4j-db:7474 3 | -------------------------------------------------------------------------------- /tomcat/properties/content-service.ogm.properties: -------------------------------------------------------------------------------- 1 | driver=org.neo4j.ogm.drivers.http.driver.HttpDriver 2 | URI=http://neo4j:n304j@neo4j-db:7474 3 | -------------------------------------------------------------------------------- /documentation-images/all-services-abstract-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactome/container/HEAD/documentation-images/all-services-abstract-view.png -------------------------------------------------------------------------------- /tomcat/manager.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /tomcat/rewrite.config: -------------------------------------------------------------------------------- 1 | RewriteRule .*/wp-content/(.*) http://localhost:80/wp-content/$1 [R,L] 2 | RewriteRule .*/pages/(.*) http://localhost:80/pages/$1 [R,L] 3 | RewriteRule .*/cgi-bin/(.*) http://localhost:80/cgi-bin/$1 [R,L] 4 | -------------------------------------------------------------------------------- /tomcat/tomcat-manager.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fireworks-generator/README.md: -------------------------------------------------------------------------------- 1 | # Fireworks generator 2 | 3 | Use this Dockerfile to generate the Fireworks file for Reactome. The [fireworks-layout application](https://github.com/reactome/fireworks-layout) will be run and the resulting files will be saved in `/fireworks/`. This docker build depends on the [neo4j](../neo4j/) image. 4 | -------------------------------------------------------------------------------- /diagram-generator/README.md: -------------------------------------------------------------------------------- 1 | # Diagram generator 2 | 3 | This dockerfile can be used to generate the diagram JSON files for Reactome, using the [diagram-converter](https://github.com/reactome/diagram-converter) application. The diagram JSON files will be placed in `/diagrams/`. This docker build depends on the [neo4j](../neo4j/) image. 4 | -------------------------------------------------------------------------------- /joomla/Secrets.pm: -------------------------------------------------------------------------------- 1 | package GKB::Secrets; 2 | 3 | use strict; 4 | use vars qw/ 5 | $GK_DB_HOST 6 | $GK_DB_USER 7 | $GK_DB_PASS 8 | $GK_DB_NAME 9 | $GK_IDB_NAME 10 | $GK_DB_PORT 11 | /; 12 | 13 | $GK_DB_HOST = 'mysql-for-tomcat'; 14 | $GK_DB_USER = 'root'; 15 | $GK_DB_PASS = 'root'; 16 | $GK_DB_NAME = 'current'; 17 | $GK_IDB_NAME = 'stable_identifiers'; 18 | $GK_DB_PORT = 3306; 19 | -------------------------------------------------------------------------------- /joomla/htaccess: -------------------------------------------------------------------------------- 1 | # BEGIN Joomla 2 | 3 | RewriteEngine On 4 | RewriteBase / 5 | RewriteRule ^index\.php$ - [L] 6 | RewriteRule ^.*common/header\.php$ /header.php [L] 7 | RewriteRule ^.*common/footer\.php$ /footer.php [L] 8 | RewriteCond %{REQUEST_FILENAME} !-f 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule . /index.php [L] 11 | 12 | # END Joomla 13 | -------------------------------------------------------------------------------- /joomla.env: -------------------------------------------------------------------------------- 1 | # MySQL Environment, used by service name 'mysql-for-joomla' in docker-compose.yml 2 | MYSQL_ROOT_PASSWORD=root 3 | MYSQL_DATABASE=website 4 | 5 | # Joomla environment variables, used by service named 'joomla-sites' in docker-compose.yml 6 | JOOMLA_DB_USER=root 7 | JOOMLA_DB_PASSWORD=root 8 | JOOMLA_DB_NAME=website 9 | JOOMLA_DB_HOST=mysql-for-joomla:3306 10 | 11 | # values after initialization are saved here: 12 | -------------------------------------------------------------------------------- /solr/solr-security.json: -------------------------------------------------------------------------------- 1 | { 2 | "authentication":{ 3 | "blockUnknown":true, 4 | "class":"solr.BasicAuthPlugin", 5 | "credentials":{"solr":"Cr510eo9gr4xZrYqI6pdqDPF9qQPA6YCbIPB9jCnI/U= 9EXD0kXW3MceCJPbPtgOHqm9FOoQdTS2sL2oOmmQpIE="}, 6 | "":{"v":0}}, 7 | "authorization":{ 8 | "class":"solr.RuleBasedAuthorizationPlugin", 9 | "permissions":[{ 10 | "name":"security-edit", 11 | "role":"admin"}], 12 | "user-role":{"solr":"admin"}}} -------------------------------------------------------------------------------- /deprecated/get_fireworks.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | 4 | echo "getting fireworks files" 5 | mkdir fireworks 6 | cd ./fireworks 7 | wget -nd -nv -r --no-parent http://reactome.org/download/current/fireworks/ 8 | rm index.html* robots.txt 9 | cd .. 10 | echo "getting diagram files" 11 | mkdir diagram 12 | cd ./diagram 13 | # this is a big download, so -q option might be nice here 14 | wget -nd -nv -r --no-parent http://reactome.org/download/current/diagram/ 15 | rm index.html* robots.txt 16 | -------------------------------------------------------------------------------- /analysis-core/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | PATH=$PATH:/var/lib/neo4j/bin/ 3 | 4 | # Start Neo4j 5 | cd /var/lib/neo4j 6 | 7 | chmod a+rw -R /data/databases/reactome.graphdb 8 | 9 | bash /docker-entrypoint.sh neo4j & 10 | 11 | echo "Waiting for Neo4j..." 12 | bash /wait-for.sh localhost:7687 -t 90 && bash /wait-for.sh localhost:7474 -t 90 13 | 14 | time java -jar /applications/analysis-core-jar-with-dependencies.jar -h localhost -p 7474 -u $NEO4J_USER -k $NEO4J_PASSWORD -o /output/analysis.bin -v 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | webapps/* 2 | mysql/tomcat_data/*.gz 3 | mysql/wordpress_data/*.gz 4 | mysql/joomla_data/*.gz 5 | logs/* 6 | fireworks/* 7 | diagram/* 8 | tomcat/analysis-service 9 | java-application-builder/downloads/* 10 | java-application-builder/logs 11 | neo4j/data/* 12 | solr/data/* 13 | neo4j/data/* 14 | neo4j/*.tgz 15 | toc_files/* 16 | tmp_files/* 17 | certificates/* 18 | docker-compose-img 19 | fireworks_and_diagrams.tar.gz 20 | diagram.tgz 21 | id_rsa* 22 | *.token 23 | 24 | # IntelliJ Files 25 | .idea/ 26 | *.iml 27 | -------------------------------------------------------------------------------- /neo4j/conf/neo4j.conf: -------------------------------------------------------------------------------- 1 | #### The next two fields are very important for Neo4j to work! DO NOT DELETE! 2 | dbms.active_database=reactome.graphdb 3 | dbms.allow_upgrade=true 4 | #### Some memory settings, you can adjust them if necessary. 5 | dbms.tx_log.rotation.retention_policy=100M size 6 | dbms.memory.pagecache.size=512M 7 | dbms.memory.heap.max_size=4G 8 | dbms.memory.heap.initial_size=512M 9 | #### Anything after this point was probably added by neo4j, 10 | #### you can probably safely ignore it, as it will be different every time 11 | #### you run neo4j. 12 | -------------------------------------------------------------------------------- /tomcat.env: -------------------------------------------------------------------------------- 1 | #Variables to be used are declared here: 2 | TOMCAT_DOCKER_ENV_PASSWORD=root 3 | 4 | # MySQL Environment 5 | MYSQL_ROOT_PASSWORD=root 6 | MYSQL_DATABASE=current 7 | # JAVA_OPTS=-Xmx20g -Xms5g -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl -Djavax.net.ssl.trustStore="/usr/local/tomcat/cacerts.jks" -Djavax.net.ssl.trustStorePassword="changeit" 8 | JAVA_OPTS=-Xmx20g -Xms4g -Djavax.net.ssl.trustStore="/usr/local/tomcat/cacerts.jks" -Djavax.net.ssl.trustStorePassword="changeit" 9 | # values after initialization are saved here: 10 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | RELEASE_VERSION=Release74 2 | 3 | # Volumes created are dependent on project name 4 | # Project name defaults to the basename of the project directory. 5 | COMPOSE_PROJECT_NAME=container 6 | 7 | #Variables to be used are declared here: 8 | TOMCAT_DOCKER_ENV_PASSWORD=root 9 | 10 | # MySQL Environment 11 | MYSQL_ROOT_PASSWORD=root 12 | MYSQL_DATABASE=website 13 | 14 | #joomla environment variables 15 | JOOMLA_DB_USER=root 16 | JOOMLA_DB_PASSWORD=root 17 | JOOMLA_DB_NAME=website 18 | JOOMLA_DB_HOST=mysql-for-joomla:3306 19 | 20 | # values after initialization are saved here: 21 | -------------------------------------------------------------------------------- /stand-alone-analysis-service/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | PATH=$PATH:/var/lib/neo4j/bin/:/opt/solr/bin:/opt/docker-solr/scripts 3 | 4 | ln -s /var/lib/neo4j/conf /conf 5 | mkdir -p /var/lib/neo4j/certificates && chown neo4j:neo4j /var/lib/neo4j/certificates 6 | 7 | chown neo4j:neo4j /logs 8 | # Start Neo4j 9 | cd /var/lib/neo4j 10 | bash /neo4j-entrypoint.sh neo4j & 11 | 12 | echo "Waiting for Neo4j..." 13 | bash /wait-for.sh localhost:7687 -t 90 && bash /wait-for.sh localhost:7474 -t 90 14 | 15 | echo "Starting tomcat..." 16 | # Now that Neo4j has been started, we can run tomcat 17 | cd /usr/local/tomcat 18 | catalina.sh run 19 | -------------------------------------------------------------------------------- /fireworks-generator/run_fireworks_generator.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | PATH=$PATH:/var/lib/neo4j/bin/ 4 | 5 | # Start Neo4j 6 | cd /var/lib/neo4j 7 | bash /docker-entrypoint.sh neo4j & 8 | 9 | echo "Waiting for Neo4j..." 10 | bash /wait-for.sh localhost:7687 -t 90 && bash /wait-for.sh localhost:7474 -t 90 11 | # env 12 | # Generate the fireworks files for all species 13 | echo "Running Fireworks generator..." 14 | cd /fireworks 15 | java -jar fireworks.jar \ 16 | -h localhost \ 17 | -p 7474 \ 18 | -u $NEO4J_USER \ 19 | -k $NEO4J_PASSWORD \ 20 | -f ./config \ 21 | -o /fireworks-json-files | grep -v DEBUG > fireworks.log 22 | 23 | tail fireworks.log 24 | 25 | ls -lht /fireworks-json-files 26 | -------------------------------------------------------------------------------- /joomla/README.md: -------------------------------------------------------------------------------- 1 | # Joomla docker image for Reactome 2 | 3 | The files in this directory can be used to create a docker image for Reactome that contains Joomla, and other components to run Reactom's Joomla CMS. 4 | 5 | - joomla.dockerfile - This file describes how the Joomla image is to be built. It is based on a PHP image. The Joomla files are located in Website, which is a submodule reference to [Website](https://github.com/reactome/Website), so be sure to pull the contents of this submodule! This file will also contain modified versions of some Reactome Perl CGI scripts - these are located in `cgi-bin` and `cgi-modules`. One thing this image does _not_ contain is the Joomla database. Docker compose will load that into a separate container running MySQL. 6 | -------------------------------------------------------------------------------- /solr/README.md: -------------------------------------------------------------------------------- 1 | # Solr index builder for Reactome 2 | 3 | The dockerfile in this directory can be used to create a Solr index for Reactome. 4 | 5 | - index-builder.dockerfile - This file will create a docker image that, as a part of its build process, will build the Solr index for Reactome. To do this, the [search-indexer](https://github.com/reactome/search-indexer.git) will be run on the Reactome [graph database](../neo4j/), which must already exist in a docker image. At the end of this process, the docker image should contain Solr, and the complete Solr index for Reactome. 6 | 7 | - solr-security.json - this contains the username and password for solr. 8 | 9 | - build_solr_index.sh - This is the script that will actually run the search indexer. 10 | -------------------------------------------------------------------------------- /solr/get_icon_xml_files.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -e 3 | cd /tmp 4 | mkdir -p icon-lib && cd icon-lib 5 | wget -O icon-lib-svg.tgz https://reactome.org/icon/icon-lib-svg.tgz 6 | tar -xf icon-lib-svg.tgz 7 | echo "Number of *.svg files in $(pwd)" 8 | ls *.svg | wc -l 9 | # for f in $(ls *.svg) ; do 10 | # FILENAME=$(basename $f) 11 | # FILENAME=${FILENAME%.svg} 12 | # wget -O $FILENAME.xml https://reactome.org/icon/$FILENAME.xml -a wget.log 13 | # done 14 | 15 | # The for-loop above takes 3 to 5 minutes. Using GNU Parallel takes ~30 seconds. 16 | # apt-get install -y parallel 17 | ls *.svg | parallel "wget -O {.}.xml https://reactome.org/icon/{.}.xml 2>&1" > wget.log 18 | 19 | echo "Number of *.xml files in $(pwd)" 20 | ls *.xml | wc -l 21 | cd - 22 | set +e 23 | -------------------------------------------------------------------------------- /analysis-core/README.md: -------------------------------------------------------------------------------- 1 | # Analysis-core dockerfiles 2 | 3 | The AnalysisService requires an intermediate file. The dockerfile here can be used to generate it. 4 | 5 | - analysis-core.dockerfile - This file will build the Analysis-Core (https://github.com/reactome/analysis-core) file for the AnalysisService. This process requires that the Reactome graph database already exist. See [neo4j](../neo4j/README.md) for more information about setting up the Reactom graph database image. 6 | 7 | The resulting output file is stored in the image as `/output/analysis.bin`. To make use of this image, you can use it in a multistage build: 8 | 9 | ```dockerfile 10 | FROM ubuntu:18.04 11 | ... 12 | FROM reactome/analysis-core as analysiscore 13 | COPY --from=analysiscore /output/analysis.bin /analysis.bin 14 | ... 15 | ``` 16 | -------------------------------------------------------------------------------- /neo4j/generate_graphdb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Start MySQL 4 | # env 5 | /usr/local/bin/docker-entrypoint.sh mysqld & 6 | 7 | echo "Waiting for MySQL..." 8 | bash /wait-for.sh localhost:3306 -t 90 9 | cd /graph-importer/ 10 | # NOTE: NEO4J_USER and NEO4J_PASSWORD are set in the dockerfile. 11 | # cat /etc/java-8-openjdk/accessibility.properties 12 | echo -e "\n\n" > /etc/java-8-openjdk/accessibility.properties 13 | echo "Generating the graph database..." 14 | java -jar ./GraphImporter-jar-with-dependencies.jar \ 15 | -h localhost \ 16 | -s 3306 \ 17 | -d current \ 18 | -u root \ 19 | -p $MYSQL_ROOT_PASSWORD \ 20 | -n /graphdb \ 21 | -i 22 | 23 | chmod a+rw -R /data/databases/reactome.graphdb 24 | echo "Contents of /graphdb: " 25 | ls -hlt /graphdb 26 | cd /graph-importer 27 | tar -zcf graph-importer-logs.tgz ./logs 28 | -------------------------------------------------------------------------------- /pathway-browser/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | PATH=$PATH:/var/lib/neo4j/bin/:/opt/solr/bin:/opt/docker-solr/scripts 3 | 4 | ln -s /var/lib/neo4j/conf /conf 5 | mkdir -p /var/lib/neo4j/certificates && chown neo4j:neo4j /var/lib/neo4j/certificates 6 | 7 | chown neo4j:neo4j /logs 8 | # Start Neo4j 9 | cd /var/lib/neo4j 10 | bash /neo4j-entrypoint.sh neo4j & 11 | 12 | echo "Waiting for Neo4j..." 13 | bash /wait-for.sh localhost:7687 -t 90 && bash /wait-for.sh localhost:7474 -t 90 14 | 15 | echo "Waiting for solr..." 16 | su-exec solr solr-foreground & 17 | bash /wait-for.sh localhost:8983 -t 120 18 | 19 | echo "Waiting for MySQL..." 20 | mysqld --user=root & 21 | bash /wait-for.sh localhost:3306 -t 120 22 | 23 | echo "Starting tomcat..." 24 | # Now that Neo4j has been started, we can run tomcat 25 | cd /usr/local/tomcat 26 | catalina.sh run 27 | -------------------------------------------------------------------------------- /tomcat/properties/data-content.service.properties: -------------------------------------------------------------------------------- 1 | # Reactome solr instance 2 | # If the user and password is not set, please leave them blank (do not delete) 3 | solr.host=http://solr-for-reactome:8983/solr 4 | solr.core=reactome 5 | solr.user=solr 6 | solr.password=solr 7 | 8 | # In order to keep the same look and feel, the header and the footer are 9 | # cached and renewed every few minutes (currently 15). 10 | # Note: /common/header.php and /common/footer.php have to be available under the host 11 | template.server=https://joomla-sites/ 12 | 13 | # Mail Configuration 14 | mail.host=smtp.oicr.on.ca 15 | mail.port=25 16 | mail.username=xxx 17 | mail.password=xxx 18 | mail.enable.auth=false 19 | mail.error.dest= 20 | mail.support.dest= 21 | mail.to= 22 | startup.notification=true 23 | 24 | svg.summary.file=/usr/local/tomcat/webapps/download/current/svgsummary.txt 25 | 26 | report.user= 27 | report.password= 28 | -------------------------------------------------------------------------------- /tomcat/DiagramJs.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/" 8 | 9 | ENV DIAGRAMJS_VERSION=master 10 | RUN cd /gitroot/ && git clone https://github.com/reactome/diagram-js.git \ 11 | && cd /gitroot/diagram-js \ 12 | && git checkout $DIAGRAMJS_VERSION \ 13 | && cd /gitroot/diagram-js \ 14 | && sed -i -e 's/http\:\/\/repo/https\:\/\/repo/g' pom.xml \ 15 | && sed -i -e 's/http/https/g' pom.xml \ 16 | && $MVN_CMD package -DskipTests \ 17 | && ls -lht /gitroot/diagram-js/target 18 | 19 | RUN cp /gitroot/diagram-js/target/diagram*war /webapps/ 20 | 21 | FROM alpine:3.8 22 | COPY --from=builder /webapps /webapps 23 | -------------------------------------------------------------------------------- /mysql/init_db.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | /entrypoint.sh mysqld --datadir=/data/mysql & 4 | time /extra_stuff/wait-for.sh localhost:3306 -t 900 5 | # This is necessary because mysql will restart after loading the database, 6 | # and we want the docker image to capture this post-restart state. So, we will 7 | # need to sleep and then wait for the reboot to complete successfully. 8 | sleep 20 9 | /extra_stuff/wait-for.sh localhost:3306 -t 900 10 | # clean up any remaining database files. 11 | rm /docker-entrypoint-initdb.d/*current* 12 | # Normally, the datadir is /var/lib/mysql but the problem is it is delcared 13 | # as a VOLUME, so persistence is problematic. Specifying datadir=/data/mysql 14 | # means that the database will be physically located in a directory that is not 15 | # a docker VOLUME, and will be immediately available when a user pulls and runs 16 | # the image. 17 | echo -e "[mysqld]\ndatadir=/data/mysql" >> /etc/mysql/my.cnf 18 | -------------------------------------------------------------------------------- /mysql/README.md: -------------------------------------------------------------------------------- 1 | # MySQL Docker image for Reactome 2 | 3 | The files in this directory can be used to create a docker image which contains a MySQL database populated with Reactome data. 4 | 5 | - mysql.dockerfile - This file can be used to create a docker image containing Reactome MySQL data. When this dockerfile is used to build an image, it will download the Reactome MySQL main database dump from the reactome.org downloads page (https://reactome.org/download-data) and then load that into MySQL which runs inside the docker image. At the end of the process, a new docker image will be available which contains the MySQL data in a database named 'gk_current'. 6 | 7 | - init_db.sh - This script is used to load the data. It sets the data directory to be different from the standard data directory so that the data will persist even after the image is stopped. 8 | 9 | - init.sh - This script is used to set up some permissions when then image is used with docker-compose. 10 | -------------------------------------------------------------------------------- /stand-alone-content-service/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | PATH=$PATH:/var/lib/neo4j/bin/:/opt/solr/bin:/opt/docker-solr/scripts 3 | 4 | ln -s /var/lib/neo4j/conf /conf 5 | 6 | mkdir -p /var/lib/neo4j/certificates && chown neo4j:neo4j /var/lib/neo4j/certificates 7 | 8 | chown neo4j:neo4j /logs 9 | # Start Neo4j 10 | cd /var/lib/neo4j 11 | bash /neo4j-entrypoint.sh neo4j & 12 | 13 | echo "Waiting for Neo4j..." 14 | bash /wait-for.sh localhost:7687 -t 90 && bash /wait-for.sh localhost:7474 -t 90 15 | chmod a+rw /opt/solr/server/solr/reactome/data/index/write.lock 16 | chmod a+rw -R /opt/solr/server/logs 17 | chmod a+rw /opt/solr/server/solr/reactome/data/tlog/* 18 | echo "Waiting for solr..." 19 | su-exec solr solr-foreground & 20 | bash /wait-for.sh localhost:8983 -t 90 21 | 22 | echo "Waiting for MySQL..." 23 | mysqld --user=root & 24 | bash /wait-for.sh localhost:3306 -t 120 25 | 26 | echo "Starting tomcat..." 27 | # Now that Neo4j and solr have been started, we can run tomcat 28 | cd /usr/local/tomcat 29 | catalina.sh run 30 | -------------------------------------------------------------------------------- /mysql/init.sh: -------------------------------------------------------------------------------- 1 | chown -vR 999:999 /var/log/mysql 2 | owner=$(ls -ld /var/log/mysql | awk 'NR==1 {print $3}') 3 | echo "Owner=" $owner 4 | log_location="/var/log/mysql" 5 | if ! [[ $owner == 999 || $owner == 'mysql' ]]; then 6 | # this means that we were not able to set permissions and ownership properly 7 | # Logs cannot be created on host if mysql has not got permissions, a copy of previous logs (which were run on previous container start) will reside on host. 8 | chown -vR 999:999 /backup 9 | touch /var/log/mysql/error.log 10 | cp --verbose -r /backup /var/log/mysql 11 | log_location="/backup" 12 | fi 13 | # Write own configurations 14 | # general_log_file is large, and to prevent logs to eat up disk space, it has been turned off 15 | # The general_log and slow_query_log can be turned on by replacing 0 by 1 16 | echo "[mysqld] 17 | log-error = $log_location/error.log 18 | general_log = 0 19 | general_log_file = $log_location/log_output.log 20 | slow_query_log = 0 21 | slow_query_log_file= $log_location/slow_query.log 22 | " > /etc/mysql/mysql.conf.d/my.cnf 23 | -------------------------------------------------------------------------------- /mysql/mysql.dockerfile: -------------------------------------------------------------------------------- 1 | # Build as: 2 | # docker build -t reactome/reactome-mysql:R67 -f mysql.dockerfile . 3 | # Run as: 4 | # docker run --rm -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=gk_current reactome/reactome-mysql:R67 5 | FROM mysql:5.7.34 6 | ARG MYSQL_ROOT_PASSWORD=root 7 | ARG RELEASE_VERSION=Release74 8 | LABEL ReleaseVersion ${RELEASE_VERSION} 9 | WORKDIR /docker-entrypoint-initdb.d 10 | RUN apt-get update && apt-get install wget netcat pigz -y 11 | # TODO: Maybe we should include the stable_identifiers database as well? 12 | # Get the zipped data 13 | RUN wget -nv https://reactome.org/download/current/databases/gk_current.sql.gz && \ 14 | unpigz gk_current.sql.gz && \ 15 | mv gk_current.sql current.sql && \ 16 | mkdir /extra_stuff 17 | 18 | ENV MYSQL_DATABASE=current 19 | ENV MYSQL_ROOT_PASSWORD=root 20 | 21 | COPY ./wait-for.sh /extra_stuff/wait-for.sh 22 | # Load the data 23 | COPY ./init_db.sh /extra_stuff/init_db.sh 24 | RUN chmod a+x /extra_stuff/wait-for.sh && \ 25 | mkdir -p /data/mysql && \ 26 | cat /etc/mysql/my.cnf && \ 27 | bash /extra_stuff/init_db.sh 28 | -------------------------------------------------------------------------------- /tomcat/FireworksJs.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/ -DskipTests" 8 | ENV FIREWORKSJS_VERSION=master 9 | ENV FIREWORKS_VERSION=master 10 | RUN cd /gitroot && git clone https://github.com/reactome/fireworks.git \ 11 | && cd /gitroot/fireworks \ 12 | && git checkout $FIREWORKS_VERSION \ 13 | && cd /gitroot/fireworks \ 14 | && sed -i -e 's/http:\/\/repo/https:\/\/repo/g' pom.xml \ 15 | && $MVN_CMD package install \ 16 | && cd /gitroot/ && git clone https://github.com/reactome/fireworks-js.git \ 17 | && cd /gitroot/fireworks-js \ 18 | && git checkout $FIREWORKSJS_VERSION \ 19 | && cd /gitroot/fireworks-js \ 20 | && $MVN_CMD package -DskipTests \ 21 | && ls -lht /gitroot/fireworks-js/target 22 | RUN cp /gitroot/fireworks-js/target/fireworks*war /webapps/ 23 | 24 | FROM alpine:3.8 25 | COPY --from=builder /webapps /webapps 26 | -------------------------------------------------------------------------------- /joomla/000-default.conf: -------------------------------------------------------------------------------- 1 | # The ServerName directive sets the request scheme, hostname and port that 2 | # the server uses to identify itself. This is used when creating 3 | # redirection URLs. In the context of virtual hosts, the ServerName 4 | # specifies what hostname must appear in the request's Host: header to 5 | # match this virtual host. For the default virtual host (this file) this 6 | # value is not decisive as it is used as a last resort host regardless. 7 | # However, you must set it for any further virtual host explicitly. 8 | #ServerName www.example.com 9 | 10 | 11 | ServerName localhost 12 | ServerAlias joomla-sites 13 | Include /etc/apache2/sites-common/000-default-common.conf 14 | 15 | 16 | 17 | 18 | ServerName localhost 19 | ServerAlias joomla-sites 20 | Include /etc/apache2/sites-common/000-default-common.conf 21 | SSLEngine On 22 | SSLProxyEngine On 23 | SSLCertificateFile /etc/apache2/ssl/server.crt 24 | SSLCertificateKeyFile /etc/apache2/ssl/server.key 25 | 26 | 27 | -------------------------------------------------------------------------------- /tomcat/PathwayBrowser.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -DskipTests -Dmaven.repo.local=/mvn/alt-m2/" 8 | 9 | WORKDIR /gitroot 10 | ENV PATHWAY_BROWSER_VERSION=master 11 | RUN git clone https://github.com/reactome-pwp/browser.git \ 12 | && cd /gitroot/browser \ 13 | && git checkout $PATHWAY_BROWSER_VERSION \ 14 | && cd /gitroot/ \ 15 | && git clone https://github.com/reactome-pwp/analysis-client.git \ 16 | && cd /gitroot/analysis-client \ 17 | && git checkout dev \ 18 | && sed -i -e 's/http:\/\/repo/https:\/\/repo/g' pom.xml \ 19 | && $MVN_CMD clean compile package install \ 20 | # Build PathwayBrowser 21 | && cd /gitroot/browser \ 22 | && $MVN_CMD clean compile package \ 23 | && cp /gitroot/browser/target/PathwayBrowser*.war /webapps/PathwayBrowser.war && du -hscx /mvn/alt-m2/ 24 | 25 | FROM alpine:3.8 26 | COPY --from=builder /webapps/PathwayBrowser.war /webapps/PathwayBrowser.war 27 | -------------------------------------------------------------------------------- /solr/build_solr_index.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -e 3 | PATH=$PATH:/var/lib/neo4j/bin/ 4 | # env 5 | echo "Getting icon XML files..." 6 | bash /get_icon_xml_files.sh 7 | 8 | cd /tmp/ 9 | ls -lht 10 | tar -zxf ehld.tgz 11 | echo "Files in /tmp/ehld " 12 | ls ehld/* | wc -l 13 | 14 | cd /var/lib/neo4j 15 | bash /neo4j-entrypoint.sh neo4j & 16 | 17 | echo "Waiting for Neo4j..." 18 | bash /wait-for.sh localhost:7687 -t 90 19 | bash /wait-for.sh localhost:7474 -t 90 20 | cd /opt/docker-solr/scripts/ 21 | 22 | # solr start 23 | su-exec solr solr start 24 | echo "Waiting for solr..." 25 | 26 | 27 | bash /wait-for.sh localhost:8983 -t 90 28 | echo "Now building the solr index..." 29 | cd /indexer 30 | # run the indexer. 31 | time su-exec root java -jar ./search-indexer-jar-with-dependencies.jar \ 32 | -a localhost -b 7474 -c $NEO4J_USER -d $NEO4J_PASSWORD \ 33 | -e http://localhost:8983/solr -o reactome -f "solr" -g "solr" \ 34 | -q /tmp/icon-lib -r /tmp/ehld -n true -l true 35 | 36 | echo "Tail of log output: " 37 | tail -n 50 /indexer/logs/* 38 | # clean up Neo4j stuff 39 | su-exec root rm -rf /var/lib/neo4j && su-exec root rm -rf /data && su-exec root rm -rf /tmp/icon-lib && su-exec root rm -rf /tmp/ehld* 40 | set +e 41 | -------------------------------------------------------------------------------- /tomcat/properties/content-service.service.properties: -------------------------------------------------------------------------------- 1 | # Reactome solr instance 2 | # If the user and password is not set, please leave them blank (do not delete) 3 | solr.host=http://solr-for-reactome:8983/solr 4 | solr.core=reactome 5 | solr.user=solr 6 | solr.password=solr 7 | 8 | # tuples.custom.folder=/usr/local/reactomes/Reactome/production/ContentService/custom 9 | tuples.custom.folder=/ContentService/custom 10 | template.server=https://joomla-sites/ 11 | 12 | analysis.server=https://localhost/ 13 | # analysis.token=/usr/local/reactomes/Reactome/production/AnalysisService/temp 14 | analysis.token=/AnalysisService/tokens 15 | # Folders MUST NOT end with "/" 16 | diagram.json.folder=/usr/local/tomcat/webapps/download/current/diagram 17 | diagram.exporter.temp.folder=/tmp 18 | fireworks.json.folder=/usr/local/tomcat/webapps/download/current/fireworks 19 | 20 | ehld.folder=/usr/local/tomcat/webapps/download/current/ehld 21 | svg.summary.file=/usr/local/tomcat/webapps/download/current/svgsummary.txt 22 | 23 | # Mail Configuration 24 | mail.host=localhost 25 | mail.port=25 26 | mail.username=xxx 27 | mail.password=xxx 28 | mail.enable.auth=false 29 | mail.to= 30 | 31 | startup.notification=true 32 | 33 | report.user= 34 | report.password= 35 | -------------------------------------------------------------------------------- /tomcat/ExperimentDigester.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/" 8 | 9 | ENV EXPERIMENT_DIGESTER_VERSION=master 10 | RUN cd /gitroot/ && git clone https://github.com/reactome/experiment-digester.git \ 11 | && cd /gitroot/experiment-digester \ 12 | && git checkout $EXPERIMENT_DIGESTER_VERSION 13 | 14 | RUN cd /gitroot/experiment-digester \ 15 | && $MVN_CMD -P Experiment-Digester-Local package -DskipTests \ 16 | && ls -lht /gitroot/experiment-digester/target 17 | 18 | # Generate the experiments.bin file 19 | RUN cd /gitroot/experiment-digester && \ 20 | java -jar target/digester-importer-jar-with-dependencies.jar \ 21 | -o /experiments.bin \ 22 | -e https://www.ebi.ac.uk/gxa/experiments-content/E-PROT-3/resources/ExperimentDownloadSupplier.Proteomics/tsv && \ 23 | ls -lht /experiments.bin 24 | 25 | RUN cp /gitroot/experiment-digester/target/ExperimentDigester.war /webapps/ 26 | RUN cp /experiments.bin /webapps/experiments.bin 27 | 28 | FROM alpine:3.8 29 | COPY --from=builder /webapps /webapps 30 | -------------------------------------------------------------------------------- /stand-alone-analysis-service/README.md: -------------------------------------------------------------------------------- 1 | # Stand-alone Reactome Analysis service 2 | 3 | `analysis-service.dockerfile` will let you build and run a stand-alone version of Reactome's [AnalysisService](https://reactome.org/dev/analysis-service) inside a docker image. 4 | 5 | AnalysisService relies on a number of other components so those docker iamges will need to be built first: 6 | - [analysis-core](../analysis-core) 7 | - [graphdb](../neo4j) 8 | - [fireworks](../fireworks-generator) 9 | - [diagrams](../diagram-generator) 10 | 11 | Once those images have been successfuly built, you can build the AnalysisService image like this: 12 | 13 | ```bash 14 | docker build -t reactome/stand-alone-analysis-service:R71 -f analysis-service.dockerfile . 15 | ``` 16 | (Replace "R71" with a tag that is reflective of the version you are working with). 17 | 18 | Run this as: 19 | ```bash 20 | docker run --name reactome-analysis-service -p 8888:8080 reactome/stand-alone-analysis-service:R71 21 | ``` 22 | 23 | Access in you browser: http://localhost:8888/AnalysisService - this will let you see the various services. 24 | 25 | It is more useful to interact with this service programmatically. To use it from the command-line: 26 | ```bash 27 | curl -X GET "http://localhost:8888/AnalysisService/database/name" -H "accept: text/plain" 28 | ``` 29 | -------------------------------------------------------------------------------- /diagram-generator/generate_diagrams.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | PATH=$PATH:/var/lib/neo4j/bin/ 4 | mkdir -p /var/lib/neo4j/certificates/ 5 | chown neo4j:neo4j /var/lib/neo4j/certificates/ 6 | chown neo4j:neo4j /var/lib/neo4j/logs/ 7 | chown neo4j:neo4j /logs 8 | # Start Neo4j 9 | cd /var/lib/neo4j 10 | bash /neo4j-entrypoint.sh neo4j & 11 | 12 | echo "Waiting for Neo4j..." 13 | bash /wait-for.sh localhost:7687 -t 120 && bash /wait-for.sh localhost:7474 -t 120 14 | 15 | # Start MySQL 16 | /usr/local/bin/docker-entrypoint.sh mysqld & 17 | # service mysqld start & 18 | echo "Waiting for MySQL..." 19 | bash /wait-for.sh localhost:3306 -t 90 20 | # If you don't "blank out" the accessibility.properties file, Java 21 | # will eventually crash when it tries to run/access some sort of accessibility- 22 | # related component that I don't think is necessary for generating the diagrams. 23 | echo -e "\n\n" > /etc/java-8-openjdk/accessibility.properties 24 | echo "Running diagram generator..." 25 | # Run the diagram generator 26 | # NOTE: NEO4J_USER and NEO4J_PASSWORD are set in the dockerfile. 27 | cd /diagram-converter/ 28 | java -jar /diagram-converter/diagram-converter-jar-with-dependencies.jar \ 29 | -a localhost \ 30 | -b 7474 \ 31 | -c $NEO4J_USER \ 32 | -d $NEO4J_PASSWORD \ 33 | -e localhost \ 34 | -f current \ 35 | -g root \ 36 | -h $MYSQL_ROOT_PASSWORD\ 37 | -o /diagrams 38 | echo "Diagram generation is complete!" 39 | ls -lht /diagrams | head 40 | -------------------------------------------------------------------------------- /tomcat/README.md: -------------------------------------------------------------------------------- 1 | # Tomcat image for Reactome 2 | 3 | The files in this directory are used to build the tomcat image for Reactome. 4 | 5 | - AnalysisService.dockerfile - This dockerfile will build the AnalysisService WAR file. 6 | - ContentService.dockerfile - This dockerfile will build the ContentService WAR file. 7 | - data-content.dockerfile - This dockerfile will build the data-content WAR file. 8 | - DiagramJs.dockerfile - This dockerfile will build the DiagramJs WAR file. 9 | - FireworksJs.dockerfile - This dockerfile will build the FireworksJs WAR file. 10 | - PathwayBrowser.dockerfile - This dockerfile will build the PathwayBrowser WAR file. 11 | - ReactomeRESTfulAPI.dockerfile - This dockerfile will build the ReactomeRESTfulAPI WAR file. 12 | - tomcat.dockerfile - This dockerfile is a multi-stage build that will copy web applications and other components from other docker images and include them into this one. Images that this depends on are the images built by the dockerfiles liste above (AnalysisService.dockerfile, ContentService.dockerfile, ...) as well as images built by [diagram-generator](../diagram-generator), [fireworks-generator](../fireworks-generator), and [AnalysisCore](../analysis-core). 13 | 14 | - java-build-mounts - The files in this directory containe configuration for building the Java applications. 15 | 16 | - properties - The files in this directory contain properties files that will be used by the Java applications at run-time. 17 | -------------------------------------------------------------------------------- /fireworks-generator/fireworks-generator.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release74 2 | 3 | FROM maven:3.6.3-jdk-8 AS builder 4 | 5 | RUN mkdir /gitroot 6 | ENV FIREWORKS_SRC_VERSION=1da5741727594bb07e445c32e417aade89f1a1f4 7 | 8 | WORKDIR /gitroot/ 9 | RUN git clone https://github.com/reactome-pwp/fireworks-layout.git 10 | WORKDIR /gitroot/fireworks-layout 11 | RUN git checkout $FIREWORKS_SRC_VERSION 12 | RUN mvn --no-transfer-progress clean compile package -DskipTests && ls -lht ./target 13 | 14 | # Now, rebase on the Reactome Neo4j image 15 | FROM reactome/graphdb:${RELEASE_VERSION} as graphdb 16 | 17 | ARG NEO4J_USER=neo4j 18 | ENV NEO4J_USER=$NEO4J_USER 19 | ARG NEO4J_PASSWORD=neo4j-password 20 | ENV NEO4J_PASSWORD=$NEO4J_PASSWORD 21 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 22 | # Neo4j extension script setting 23 | ENV EXTENSION_SCRIPT /data/neo4j-init.sh 24 | 25 | COPY --from=builder /gitroot/fireworks-layout/target/fireworks-jar-with-dependencies.jar /fireworks/fireworks.jar 26 | COPY --from=builder /gitroot/fireworks-layout/config /fireworks/config 27 | COPY ./wait-for.sh /wait-for.sh 28 | COPY ./run_fireworks_generator.sh /run_fireworks_generator.sh 29 | 30 | RUN chmod a+x /run_fireworks_generator.sh 31 | RUN mkdir /fireworks-json-files 32 | RUN /run_fireworks_generator.sh 33 | 34 | FROM alpine:3.8 35 | COPY --from=graphdb /fireworks-json-files /fireworks-json-files 36 | COPY --from=graphdb /fireworks/fireworks.log /fireworks/fireworks.log 37 | RUN ls -lht /fireworks-json-files 38 | -------------------------------------------------------------------------------- /tomcat/ContentService.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 4 | RUN mkdir -p /mvn/alt-m2/ && mkdir /webapps && mkdir /gitroot 5 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/ -DskipTests" 6 | 7 | # Build the ContentService application 8 | ENV CONTENT_SERVICE_VERSION=master 9 | # Get source code 10 | RUN cd /gitroot/ \ 11 | && git clone https://github.com/reactome/content-service.git \ 12 | && cd /gitroot/content-service \ 13 | && git checkout $CONTENT_SERVICE_VERSION 14 | # Build the content service 15 | RUN cd /gitroot/content-service/src/main/resources \ 16 | && echo "log4j.logger.httpclient.wire.header=WARN" >> log4j.properties && echo "log4j.logger.httpclient.wire.content=WARN" >> log4j.properties && echo "log4j.logger.org.apache.commons.httpclient=WARN" >> log4j.properties \ 17 | && sed -i -e 's/<\/configuration>/<\/configuration>/g' logback.xml \ 18 | && cd /gitroot/content-service \ 19 | && sed -i -e 's/http/https/g' pom.xml \ 20 | && sed -i -e 's/http:\/\/repo/https:\/\/repo/g' pom.xml \ 21 | && ${MVN_CMD} package -P ContentService-Local \ 22 | && cp /gitroot/content-service/target/ContentService*.war /webapps/ContentService.war && du -hscx /mvn/alt-m2/ 23 | 24 | FROM alpine:3.8 25 | COPY --from=builder /webapps/ContentService.war /webapps/ContentService.war 26 | -------------------------------------------------------------------------------- /tomcat/properties/analysis-service.service.properties: -------------------------------------------------------------------------------- 1 | #The AnalysisService needs to load the Reactome filtered data from a file the 2 | #first time it is loaded in Tomcat, and also needs to store the analysis result 3 | #in a folder, to be able to retrieve results associated to a token in the future 4 | analysis.data.file=/analysis.bin 5 | analysis.data.tmp=/usr/local/AnalysisService/analysis-results 6 | 7 | # In order to keep the same look and feel, the header and the footer are 8 | # cached and renewed every few minutes (currently 15). 9 | # Note: /common/header.php and /common/footer.php have to be available under the host 10 | template.server=https://joomla-sites/ 11 | 12 | # Mail Configuration 13 | mail.host=localhost 14 | mail.port=25 15 | mail.username=xxx 16 | mail.password=xxx 17 | mail.enable.auth=false 18 | mail.to= 19 | 20 | fireworks.json.folder=/usr/local/tomcat/webapps/download/current/fireworks 21 | diagram.json.folder=/usr/local/tomcat/webapps/download/current/diagram 22 | ehld.folder=/usr/local/tomcat/webapps/download/current/ehld 23 | svg.summary.file=/usr/local/tomcat/webapps/download/current/ehld/svgsummary.txt 24 | 25 | neo4j.host=neo4j-db 26 | neo4j.port=7474 27 | neo4j.user=neo4j 28 | neo4j.password=n304j 29 | 30 | report.user= 31 | report.password= 32 | 33 | startup.notification=true 34 | startup.notification.from= 35 | startup.notification.to= 36 | 37 | analysis.result.root=/usr/local/AnalysisService/analysis-results 38 | analysis.report.log=/usr/local/AnalysisService/analysis-reports 39 | log4j.root=/usr/local/AnalysisService/log 40 | -------------------------------------------------------------------------------- /tomcat/AnalysisService.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -DskipTests -Dmaven.repo.local=/mvn/alt-m2/" 8 | ENV ANALYSIS_SERVICE_VERSION=master 9 | ENV ANALYSIS_REPORT_VERSION=master 10 | RUN cd /gitroot/ && git clone https://github.com/reactome/analysis-report.git \ 11 | && cd /gitroot/analysis-report \ 12 | && git checkout $ANALYSIS_REPORT_VERSION \ 13 | && cd /gitroot/ && git clone https://github.com/reactome/analysis-service.git \ 14 | && cd /gitroot/analysis-service \ 15 | && git checkout $ANALYSIS_SERVICE_VERSION \ 16 | && cd /gitroot/analysis-report \ 17 | && ${MVN_CMD} clean compile package install \ 18 | && cd /gitroot && git clone https://github.com/reactome/analysis-core.git && cd ./analysis-core && ${MVN_CMD} clean compile package install \ 19 | && cd /gitroot/analysis-service \ 20 | && sed -i -e 's/http:\/\/repo\.maven/https:\/\/repo\.maven/g' pom.xml \ 21 | && ${MVN_CMD} package -P AnalysisService-Local && ls -lht ./target \ 22 | && cp ./target/AnalysisService.war /webapps/AnalysisService.war \ 23 | && rm -rf /mvn/alt-m2 24 | 25 | # RUN ls -lht /gitroot/analysis-service/target && cp /gitroot/analysis-service/target/AnalysisService.war /webapps/ && du -hscx /mvn/alt-m2/ && ls -lht /webapps/ 26 | 27 | FROM alpine:3.8 28 | COPY --from=builder /webapps/AnalysisService.war /webapps/AnalysisService.war 29 | -------------------------------------------------------------------------------- /pathway-browser/README.md: -------------------------------------------------------------------------------- 1 | # Pathway Browser & Analysis Service 2 | 3 | `pathway-browser.dockerfile` will let you build a docker image that contains the PathwayBrowser so that you can run Reactome analyses and view them in your web browser. 4 | 5 | This relies on a number of other components, so those images will need to be built first: 6 | 7 | - [content-service](../stand-alone-content-service) 8 | - [analysis-service](../stand-alone-analysis-service) 9 | - [analysis-core](../analysis-core) 10 | 11 | Once those images have been successfully built, you can build the Pathway Browser & Analysis Service image like this: 12 | 13 | ```bash 14 | docker build -t reactome/analysis-service-and-pwb:Release77 --build-arg RELEASE_VERSION=Release77 --build-arg GITHUB_TOKEN=$GITHUB_TOKEN -f pathway-browser.dockerfile . 15 | ``` 16 | 17 | **NOTE:** `$GITHUB_TOKEN` must be a valid github personal access token. This is needed to build the reacfoam component. You can generate a token in github under Settings -> Developer Settings -> Personal access tokens. You will need to give your token all "repo" permissions (repo:status, repo_deployment, repo_public, repo:invite, security_events) and read:repo_hook. You will also need to have access (read-access, at least) to the reacfoam repository for this to work. 18 | 19 | You can run this docker image like this: 20 | ```bash 21 | docker run --name docker run --name reactome-pwb-and-analysis-service -p 8080:8080 reactome/analysis-service-and-pwb:Release77 22 | ``` 23 | 24 | Navigate to http://localhost/PathwayBrowser/ to use the container. It may be a bit slow initially, this container is a bit resource-hungry. 25 | -------------------------------------------------------------------------------- /tomcat/java-build-mounts/ReactomeJar.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /analysis-core/analysis-core.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release78 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | ENV PATHWAY_BROWSER_VERSION=master 4 | RUN mkdir -p /gitroot 5 | WORKDIR /gitroot 6 | # master fails when interacting with neo4j, for some reason. 7 | # ENV ANALYSIS_CORE_VERSION=386fd461c2c702e574ad178f8995f3a8a7390166 8 | ENV ANALYSIS_CORE_VERSION=00b0bb611a6ef8892e07a91745464de328610580 9 | RUN git clone https://github.com/reactome/analysis-core.git && \ 10 | cd analysis-core && git checkout $ANALYSIS_CORE_VERSION && \ 11 | cd /gitroot/analysis-core && \ 12 | mvn --no-transfer-progress clean compile package -DskipTests && \ 13 | mkdir -p /analysis-core && \ 14 | mkdir /applications && \ 15 | cp ./target/analysis-core-jar-with-dependencies.jar /applications/analysis-core-jar-with-dependencies.jar 16 | 17 | # Now, rebase on the Reactome Neo4j image 18 | FROM reactome/graphdb:$RELEASE_VERSION as analysiscorebuilder 19 | COPY --from=builder /applications/analysis-core-jar-with-dependencies.jar /applications/analysis-core-jar-with-dependencies.jar 20 | ARG NEO4J_USER=neo4j 21 | ENV NEO4J_USER=$NEO4J_USER 22 | ARG NEO4J_PASSWORD=neo4j-password 23 | ENV NEO4J_PASSWORD=$NEO4J_PASSWORD 24 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 25 | # Neo4j extension script setting 26 | ENV EXTENSION_SCRIPT /data/neo4j-init.sh 27 | # TODO: better name for script outside of container 28 | COPY ./entrypoint.sh /build_analysis_core.sh 29 | RUN chmod a+x /build_analysis_core.sh 30 | COPY ./wait-for.sh /wait-for.sh 31 | RUN apt-get update && apt-get install curl -y && \ 32 | mkdir /output && \ 33 | /build_analysis_core.sh 34 | # Switch to alpine and then copy over the data since we don't need anything else at this point. 35 | FROM alpine:3.8 36 | COPY --from=analysiscorebuilder /output/analysis.bin /output/analysis.bin 37 | -------------------------------------------------------------------------------- /stand-alone-content-service/README.md: -------------------------------------------------------------------------------- 1 | # Stand-alone Reactome Content service 2 | 3 | `content-service.dockerfile` can be used to build a stand-alone docker image that contains everything necessary to run Reactome's [ContentService](https://reactome.org/dev/content-service). 4 | 5 | Because the ContentService relies on a number of other Reactome components, those will need to be built first. 6 | 7 | The images that this image depends on are: 8 | - [graphdb](../neo4j) 9 | - [solr](../solr) 10 | - [diagrams](../diagram-generator) 11 | - [fireworks](../fireworks-generator) 12 | - [mysql](../mysql) 13 | 14 | Once these images have been built locally, you can build the ContentService. This is as simple as: 15 | 16 | ```bash 17 | docker build -t reactome/stand-alone-content-service:R71 -f content-service.dockerfile . 18 | ``` 19 | 20 | (Replace "R71" with a tag that is reflective of the version you are working with). 21 | 22 | Run this as: 23 | ```bash 24 | docker run --name reactome-content-service -p 8888:8080 reactome/stand-alone-content-service:R71 25 | ``` 26 | Access in you browser: http://localhost:8888/ContentService - this will let you see the various services. 27 | 28 | It is more useful to interact with the ContentService programmatically. To use it from the command-line: 29 | ```bash 30 | curl -X GET "http://localhost:8888/ContentService/data/complex/R-HSA-5674003/subunits?excludeStructures=false" -H "accept: application/json" 31 | ``` 32 | For exporter endpoints which return PDF files or images, be sure to use "--output FILE" with curl. For example: 33 | ```bash 34 | curl --output R-HSA-177929_event.PDF -X GET "http://localhost:8888/ContentService/exporter/document/event/R-HSA-177929.pdf?level%20%5B0%20-%201%5D=1&diagramProfile=Modern&resource=total&analysisProfile=Standard" -H "accept: application/pdf" 35 | ``` 36 | -------------------------------------------------------------------------------- /joomla/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 34 | result=$? 35 | if [ $result -eq 0 ] ; then 36 | if [ -n "$command" ] ; then 37 | exec $command 38 | fi 39 | exit 0 40 | fi 41 | sleep 1 42 | done 43 | echo "Operation timed out" >&2 44 | exit 1 45 | } 46 | 47 | while [ $# -gt 0 ] 48 | do 49 | case "$1" in 50 | *:* ) 51 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 52 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 53 | shift 1 54 | ;; 55 | -q | --quiet) 56 | QUIET=1 57 | shift 1 58 | ;; 59 | -t) 60 | TIMEOUT="$2" 61 | if [ "$TIMEOUT" = "" ]; then break; fi 62 | shift 2 63 | ;; 64 | --timeout=*) 65 | TIMEOUT="${1#*=}" 66 | shift 1 67 | ;; 68 | --) 69 | shift 70 | break 71 | ;; 72 | --help) 73 | usage 0 74 | ;; 75 | *) 76 | echoerr "Unknown argument: $1" 77 | usage 1 78 | ;; 79 | esac 80 | done 81 | 82 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 83 | echoerr "Error: you need to provide a host and port to test." 84 | usage 2 85 | fi 86 | 87 | wait_for "$@" 88 | -------------------------------------------------------------------------------- /neo4j/README.md: -------------------------------------------------------------------------------- 1 | # Neo4j docker container for Reactome 2 | 3 | The dockerfiles in this directory can be used to build docker images containing Reactome data in a ready-to-use docker image. 4 | 5 | - neo4j_stand-alone.dockerfile - this is used to build a new docker image that contains the Reactome graph database. In order to use this, you must first download the Reactome graph database (you can find it on the Reactome downloads page: https://reactome.org/download-data) and place it in the same directory as this dockerfile. Be sure to rename the file with the approprite Release number. For example, if you are working with the Release 67 graph database file, name it "reactome-R67.graphdb.tgz". This is important because the dockerfile requires a file with the name `reactome-${RELEASE_VERSION}.graphdb.tgz`. Building the graph database with this dockerfile is probably more appropriate for users who ONLY want the graph database. 6 | 7 | Build this image like this: 8 | 9 | ```bash 10 | docker build -t reactome/grapdb:R999 \ 11 | --build-arg NEO4J_USER=neo4j \ 12 | --build-arg NEO4J_PASSWORD=xxxx \ 13 | --build-arg RELEASE_VERSION=999 \ 14 | -f ./neo4j_stand-alone.dockerfile . 15 | ``` 16 | The image can be run like this: 17 | ```bash 18 | docker run --rm -p 7474:7474 -p 7687:7687 --name reactome-graphdb reactome/graphdb:R999 19 | ``` 20 | - neo4j-ini.sh - this is used to extract and prepare the graph database file for neo4j. 21 | 22 | - neo4j_generated_from_mysql.dockerfile - this is used to build a new docker image that contains the Reactome graph database. This dockerfile will build the graph database from the data in the Reactome MySQL database. See [mysql](../mysql/README.md) for more information about the MySQL database. This dockerfile is used by others which can be used to run the entire Reactome system in docker containers. 23 | - generate_graphdb.sh - this is used to generate the graph database from the relational database using the [graph-importer](https://github.com/reactome/graph-importer). 24 | -------------------------------------------------------------------------------- /tomcat/java-build-mounts/JavaBuildPackaging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /neo4j/neo4j-init.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # These cause problems with the latest docker-entrypoint.sh for neo4j. 4 | # set -euo pipefail 5 | # IFS=$'\n\t' 6 | 7 | echo "Extension script started" 8 | ls -lht /data 9 | ls -lht /data/databases/ 10 | # do not run init script at each container start but only at the first start 11 | # TODO: Check for the existence of /var/lib/neo4j/data/databases/reactome.graphdb.tgz 12 | # or that the directory /data/databases/reactome.graphdb/ does not exist (or if it does, it's empty). 13 | # This flag thing is causing problems. 14 | # if [ ! -e /data/neo4j-import-done.flag ]; then 15 | if [ -e /var/lib/neo4j/data/databases/reactome.graphdb.tgz ] ; then 16 | # currentDir="$(pwd)" 17 | cd /var/lib/neo4j/data/databases/ 18 | # new directory - contents of reactome.graphdb.tgz will be put in here 19 | # because the directory within reactome.graphdb.tgz is inconsistently named 20 | # (for example: reactome.graphdb.61 vs. reactome.graphdb.v62 - notice the 21 | # extra "v") and neo4j needs an EXACT directory name, so we will ensure 22 | # that the data will *always* be in "reactome.graphdb" - then we never 23 | # need to update dbms.active_database in neo4j.conf 24 | mkdir -p reactome.graphdb 25 | echo "Extracting reactome graphdb..." 26 | tar -C reactome.graphdb --strip-components=1 -xzf reactome.graphdb.tgz 27 | # cd $currentDir 28 | # touch /data/neo4j-import-done.flag 29 | ls -lht /data 30 | chown -R neo4j:neo4j /var/lib/neo4j/data/databases/ 31 | echo "Data-extraction is complete!" 32 | # clean up - the tgz is no longer needed. 33 | rm /var/lib/neo4j/data/databases/reactome.graphdb.tgz 34 | du -hscx /var/lib/neo4j/data/databases/reactome.graphdb 35 | else 36 | chown -R neo4j:neo4j /var/lib/neo4j/data/databases/ 37 | echo "The graphdb file reactome.graphdb.tgz was not present as \"/var/lib/neo4j/data/databases/reactome.graphdb.tgz\" - perhaps it has already been imported and the tgz has been removed." 38 | fi 39 | echo "The extension script is complete!" 40 | -------------------------------------------------------------------------------- /tomcat/java-build-mounts/deprecated/AnalysisTools-Service-web.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | Spring MVC Application 7 | 8 | 9 | 10 | index.html 11 | 12 | 13 | 14 | mvc-dispatcher 15 | org.springframework.web.servlet.DispatcherServlet 16 | 1 17 | 18 | 19 | 20 | mvc-dispatcher 21 | / 22 | 23 | 24 | 25 | 26 | cors 27 | org.reactome.server.analysis.service.utils.CORSFilter 28 | 29 | 30 | cors 31 | /* 32 | 33 | 34 | 35 | Wordpress 36 | uk.ac.ebi.pride.web.util.servlet.proxy.ProxyServlet 37 | 38 | proxyHost 39 | localhost 40 | 41 | 42 | proxyPort 43 | 8082 44 | 45 | 46 | proxyPath 47 | /wordpress 48 | 49 | 50 | 51 | Wordpress 52 | /wordpress/* 53 | 54 | -------------------------------------------------------------------------------- /wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /mysql/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /neo4j/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /solr/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /analysis-core/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /diagram-generator/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /pathway-browser/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /fireworks-generator/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /neo4j/neo4j_stand-alone.dockerfile: -------------------------------------------------------------------------------- 1 | # This is for running the Reactome graph database in a stand-alone Neo4j docker container. 2 | # This image will be based on the "neo4j" image, with Reactome data built in. 3 | # 4 | # You can pass in build arguments for neo4j username and password, location of graph database file to use, and also for release number. 5 | # 6 | # With build args: 7 | # `docker build -t reactome/graphdb:ReleaseXX \ 8 | # --build-arg NEO4J_USER=neo4j \ 9 | # --build-arg NEO4J_PASSWORD=xxxx \ 10 | # --build-arg ReleaseVersion=ReleaseXX \ 11 | # -f ./neo4j_stand-alone.dockerfile .` 12 | # 13 | # Specifying location of graph database: 14 | # `docker build -t reactome/graphdb:ReleaseXX \ 15 | # --build-arg GRAPHDB_LOCATION=./reactome-ReleaseXX.graphdb.tgz \ 16 | # --build-arg NEO4J_USER=neo4j \ 17 | # --build-arg NEO4J_PASSWORD=xxxx \ 18 | # --build-arg ReleaseVersion=ReleaseXX \ 19 | # -f ./neo4j_stand-alone.dockerfile .` 20 | # 21 | # To run this, execute: `docker run --rm -p 7474:7474 -p 7687:7687 --name reactome-graphdb reactome/graphdb:ReleaseXX` 22 | # The Neo4j web interface will be available at http://localhost:7474 23 | FROM neo4j:3.5.25 24 | # RELEASE_VERSION should be given when building the image. 25 | ARG RELEASE_VERSION=Release75 26 | # If you want to override user/password at RUN time, do it as 'docker run -e NEO4J_AUTH="neo4j/PASSWORD" ... reactome/graphdb' 27 | ARG NEO4J_USER=neo4j 28 | ARG NEO4J_PASSWORD=neo4j-password 29 | ARG GRAPHDB_LOCATION=./reactome-${RELEASE_VERSION}.graphdb.tgz 30 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 31 | ENV EXTENSION_SCRIPT /data/neo4j-init.sh 32 | 33 | LABEL maintainer=solomon.shorser@oicr.on.ca 34 | LABEL ReleaseVersion=$RELEASE_VERSION 35 | EXPOSE 7474 7473 7687 36 | # default is a local, zipped copy of the Reactome graph database. 37 | COPY ${GRAPHDB_LOCATION} /var/lib/neo4j/data/databases/reactome.graphdb.tgz 38 | COPY ./conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 39 | COPY ./neo4j-init.sh /data/neo4j-init.sh 40 | 41 | # While the image built by neo4j_generated_from_mysql.dockerfile is preferred, 42 | # it is sometimes useful/faster to use the pre-built graph database found on reactome.org's download page. 43 | -------------------------------------------------------------------------------- /stand-alone-analysis-service/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /stand-alone-content-service/wait-for.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # taken from https://github.com/Eficode/wait-for/blob/master/wait-for 3 | 4 | which nc 5 | if [ $? -eq 1 ] ; then 6 | apt-get update 7 | apt-get install netcat -y 8 | fi 9 | 10 | TIMEOUT=15 11 | QUIET=0 12 | 13 | echoerr() { 14 | if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi 15 | } 16 | 17 | usage() { 18 | exitcode="$1" 19 | cat << USAGE >&2 20 | Usage: 21 | $cmdname host:port [-t timeout] [-- command args] 22 | -q | --quiet Do not output any status messages 23 | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout 24 | -- COMMAND ARGS Execute command with args after the test finishes 25 | USAGE 26 | exit "$exitcode" 27 | } 28 | 29 | wait_for() { 30 | command="$*" 31 | echo "Waiting for $HOST:$PORT..." 32 | for i in `seq $TIMEOUT` ; do 33 | 34 | if [ $(( $i % 30 )) -eq 0 ] ; then 35 | echo "Waited $i seconds out of $TIMEOUT for $HOST:$PORT..." 36 | fi 37 | 38 | nc -z "$HOST" "$PORT" > /dev/null 2>&1 39 | result=$? 40 | if [ $result -eq 0 ] ; then 41 | if [ -n "$command" ] ; then 42 | exec $command 43 | fi 44 | echo "Got a response from $HOST:$PORT" 45 | exit 0 46 | fi 47 | sleep 1 48 | done 49 | echo "Operation timed out" >&2 50 | exit 1 51 | } 52 | 53 | while [ $# -gt 0 ] 54 | do 55 | case "$1" in 56 | *:* ) 57 | HOST=$(printf "%s\n" "$1"| cut -d : -f 1) 58 | PORT=$(printf "%s\n" "$1"| cut -d : -f 2) 59 | shift 1 60 | ;; 61 | -q | --quiet) 62 | QUIET=1 63 | shift 1 64 | ;; 65 | -t) 66 | TIMEOUT="$2" 67 | if [ "$TIMEOUT" = "" ]; then break; fi 68 | shift 2 69 | ;; 70 | --timeout=*) 71 | TIMEOUT="${1#*=}" 72 | shift 1 73 | ;; 74 | --) 75 | shift 76 | break 77 | ;; 78 | --help) 79 | usage 0 80 | ;; 81 | *) 82 | echoerr "Unknown argument: $1" 83 | usage 1 84 | ;; 85 | esac 86 | done 87 | 88 | if [ "$HOST" = "" -o "$PORT" = "" ]; then 89 | echoerr "Error: you need to provide a host and port to test." 90 | usage 2 91 | fi 92 | 93 | wait_for "$@" 94 | -------------------------------------------------------------------------------- /neo4j/neo4j_generated_from_mysql.dockerfile: -------------------------------------------------------------------------------- 1 | ARG NEO4J_USER=neo4j 2 | ARG NEO4J_PASSWORD=neo4j-password 3 | ARG RELEASE_VERSION=Release74 4 | FROM maven:3.6.3-jdk-8 AS builder 5 | 6 | RUN mkdir /gitroot 7 | ENV GRAPH_IMPORTER_VERSION=master 8 | WORKDIR /gitroot/ 9 | 10 | RUN git clone https://github.com/reactome/graph-importer.git 11 | WORKDIR /gitroot/graph-importer 12 | RUN git checkout $GRAPH_IMPORTER_VERSION && \ 13 | mvn --no-transfer-progress clean compile package -DskipTests && ls -lht ./target && \ 14 | mkdir /graph-importer && cp /gitroot/graph-importer/target/GraphImporter-jar-with-dependencies.jar /graph-importer/GraphImporter-jar-with-dependencies.jar 15 | 16 | # Add MySQL layer 17 | 18 | FROM reactome/reactome-mysql:${RELEASE_VERSION} as relationaldb 19 | ENV MYSQL_ROOT_PASSWORD=root 20 | COPY --from=builder /graph-importer/GraphImporter-jar-with-dependencies.jar /graph-importer/GraphImporter-jar-with-dependencies.jar 21 | WORKDIR / 22 | RUN mkdir /graphdb && \ 23 | mkdir -p /usr/share/man/man1 24 | COPY ./generate_graphdb.sh /generate_graphdb.sh 25 | COPY ./wait-for.sh /wait-for.sh 26 | RUN chmod a+x /generate_graphdb.sh && \ 27 | apt-get update && apt-get install gosu openjdk-8-jdk-headless openjdk-8-jre-headless netcat -y && apt-get autoremove && \ 28 | /generate_graphdb.sh 29 | RUN chmod a+rw -R /graphdb 30 | # Now re-base on neo4j 31 | FROM neo4j:3.5.14 32 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 33 | LABEL maintainer=solomon.shorser@oicr.on.ca 34 | LABEL ReleaseVersion=$RELEASE_VERSION 35 | EXPOSE 7474 7473 7687 36 | COPY --from=relationaldb /graphdb /var/lib/neo4j/data/databases/reactome.graphdb 37 | # Let's keep a copy of the graph-importer's logs. 38 | COPY --from=relationaldb /graph-importer/graph-importer-logs.tgz /graph-importer-logs.tgz 39 | USER root 40 | COPY ./conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 41 | RUN touch /data/neo4j-import-done.flag \ 42 | && chown -R neo4j:neo4j /data/databases/reactome.graphdb \ 43 | && chown neo4j:neo4j /var/lib/neo4j/conf/neo4j.conf \ 44 | && chmod u+rw /var/lib/neo4j/conf/neo4j.conf \ 45 | && chmod a+rw -R /data/databases/* \ 46 | && chmod a+rw -R /data/* 47 | # USER neo4j 48 | ENV EXTENSION_SCRIPT /data/neo4j-init.sh 49 | COPY ./neo4j-init.sh /data/neo4j-init.sh 50 | -------------------------------------------------------------------------------- /tomcat/data-content.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps 4 | RUN mkdir /gitroot 5 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 6 | RUN mkdir -p /mvn/alt-m2/ 7 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/" 8 | 9 | 10 | ENV DATA_CONTENT_VERSION=master 11 | RUN cd /gitroot/ && git clone https://github.com/reactome/data-content.git \ 12 | && cd /gitroot/data-content \ 13 | && git checkout $DATA_CONTENT_VERSION 14 | 15 | # The TLD files cannot be in the tags directory. Tomcat was throwing errors about this. 16 | # The solution is to move or rename the TLD files. I'm moving them to "custom-tags". 17 | # See: https://stackoverflow.com/q/38593625 or section 7.3.1 in: 18 | # https://download.oracle.com/otn-pub/jcp/jsp-2.2-mrel-oth-JSpec/jsp-2_2-mrel-spec.pdf?AuthParam=1548101315_d5c1a23b8f143b2f92e27a656a477f79 19 | WORKDIR /gitroot/data-content 20 | RUN cp -a src/main/webapp/WEB-INF/tags src/main/webapp/WEB-INF/custom-tags 21 | # Update files that were referencing customTag.tld or sortTag.tld 22 | RUN { for f in $(grep -RIH \/tags\/customTag.tld . | cut -d ':' -f 1) ; do echo "fixing customTag.tld path in $f" ; sed -i -e 's/tags/custom-tags/g' $f ; done ; } 23 | RUN { for f in $(grep -RIH \/tags\/sortTag.tld . | cut -d ':' -f 1) ; do echo "fixing sortTag.tld path in $f" ; sed -i -e 's/tags/custom-tags/g' $f ; done ; } 24 | 25 | RUN echo "Files still referencing tags/customTag.tld" && grep -RIH \/tags\/customTag.tld . | cut -d ':' -f 1 26 | RUN echo "Files still referencing tags/sortTag.tld" && grep -RIH \/tags\/sortTag.tld . | cut -d ':' -f 1 27 | 28 | RUN cd src/main/resources && sed -i -e 's/<\/configuration>/<\/configuration>/g' logback.xml 29 | RUN cd /gitroot/data-content && sed -i -e 's/1\.2\.0-SNAPSHOT<\/reactome\.search\.core>/1.3.0-SNAPSHOT<\/reactome.search.core>/g' pom.xml 30 | RUN $MVN_CMD clean compile package install -P DataContent-Local \ 31 | && cp /gitroot/data-content/target/content*.war /webapps/content.war && du -hscx /mvn/alt-m2/ 32 | 33 | FROM alpine:3.8 34 | COPY --from=builder /webapps/content.war /webapps/content.war 35 | -------------------------------------------------------------------------------- /stand-alone-analysis-service/analysis-service-maven-settings.xml: -------------------------------------------------------------------------------- 1 | 5 | /mvn/alt-m2/ 6 | 7 | 8 | AnalysisService-Local 9 | 10 | 11 | /analysis.bin 12 | /analysis.bin 13 | /tmp/analysis-tmp 14 | /usr/local/AnalysisService/analysis-results 15 | /usr/local/AnalysisService/analysis-reports 16 | 17 | /usr/local/AnalysisService/log 18 | 19 | http://localhost/ 20 | 21 | localhost 22 | 25 23 | user 24 | password 25 | user@mailserver.org 26 | false 27 | 28 | localhost 29 | 7474 30 | neo4j 31 | neo4j-password 32 | 33 | /tmp/diagrams 34 | /tmp/ehld 35 | /tmp/fireworks 36 | /tmp/analysis-data 37 | /tmp/svg 38 | /tmp 39 | false 40 | 41 | 42 | 43 | report.user 44 | report.password 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /tomcat/tomcat-users.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 22 | 30 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /pathway-browser/analysis-service-maven-settings.xml: -------------------------------------------------------------------------------- 1 | 5 | /mvn/alt-m2/ 6 | 7 | 8 | AnalysisService-Local 9 | 10 | 11 | /analysis.bin 12 | /analysis.bin 13 | /tmp/analysis-tmp 14 | /usr/local/AnalysisService/analysis-results 15 | /usr/local/AnalysisService/analysis-reports 16 | 17 | /usr/local/AnalysisService/log 18 | 19 | http://localhost/ 20 | 21 | localhost 22 | 25 23 | user 24 | password 25 | user@mailserver.org 26 | false 27 | 28 | localhost 29 | 7474 30 | neo4j 31 | neo4j-password 32 | 33 | /tmp/diagrams 34 | /tmp/ehld 35 | /tmp/fireworks 36 | /tmp/analysis-data 37 | /tmp/svg 38 | /tmp 39 | false 40 | 41 | 42 | 43 | report.user 44 | report.password 45 | 46 | 47 | 48 | Experiment-Digester-Local 49 | 50 | 51 | /experiments.bin 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /joomla/000-default-common.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerAdmin webmaster@localhost 3 | DocumentRoot /var/www/html 4 | DirectoryIndex index.html index.php 5 | ScriptAlias /cgi-bin /var/www/html/cgi-bin 6 | # LogLevel dumpio:trace7 7 | # DumpIOOutput On 8 | # DumpIOInput On 9 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 10 | # error, crit, alert, emerg. 11 | # It is also possible to configure the loglevel for particular 12 | # modules, e.g. 13 | #LogLevel info ssl:warn 14 | 15 | ErrorLog ${APACHE_LOG_DIR}/error.log 16 | CustomLog ${APACHE_LOG_DIR}/access.log combined 17 | 18 | # Proxies to the tomcat container. 19 | ProxyPass "/AnalysisService" "http://tomcat-server:8080/AnalysisService" 20 | ProxyPass "/ContentService" "http://tomcat-server:8080/ContentService" 21 | ProxyPass "/content" "http://tomcat-server:8080/content" 22 | ProxyPass "/download/current/fireworks" "http://tomcat-server:8080/download/current/fireworks" 23 | ProxyPass "/download/current/ehld" "http://tomcat-server:8080/download/current/ehld" 24 | ProxyPass "/PathwayBrowser" "http://tomcat-server:8080/PathwayBrowser" 25 | ProxyPass "/ReactomeRESTfulAPI" "http://tomcat-server:8080/ReactomeRESTfulAPI" 26 | ProxyPass "/ExperimentDigester" "http://tomcat-server:8080/ExperimentDigester" 27 | 28 | # The icon-lib is now managed by the data-content project 29 | ProxyPass "/icon-lib" "http://tomcat-server:8080/content/icon-lib" 30 | 31 | # Folder containing all the Icons (svg, png, emf and xml) 32 | Alias /icon /var/www/html/Icons 33 | Alias /reacfoam /var/www/html/reacfoam 34 | 35 | Redirect /DiagramJs /DiagramJs/ 36 | 37 | ProxyPass http://tomcat-server:8080/DiagramJs/ 38 | Header add "Access-Control-Allow-Origin" "*" 39 | 40 | 41 | Redirect /FireworksJs /FireworksJs/ 42 | 43 | ProxyPass http://tomcat-server:8080/FireworksJs/ 44 | Header add "Access-Control-Allow-Origin" "*" 45 | 46 | 47 | 48 | ProxyPass http://tomcat-server:8080/ReactomeRESTfulAPI/ 49 | Header add "Access-Control-Allow-Origin" "*" 50 | 51 | 52 | 53 | AllowOverride All 54 | Require all granted 55 | Options +Includes 56 | XBitHack on 57 | # allows CORS for static content 58 | Header set Access-Control-Allow-Origin * 59 | 60 | 61 | 62 | DirectoryIndex index.html 63 | Options Indexes FollowSymlinks MultiViews 64 | AllowOverride None 65 | #Order allow,deny 66 | #Allow from all 67 | # required for apache 2.4+ 68 | Require all granted 69 | Options +Includes 70 | XBitHack on 71 | Header set Access-Control-Allow-Origin "*" 72 | 73 | -------------------------------------------------------------------------------- /prereqs-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: 4 | # 5 | # ./prereqs-ubuntu.sh 6 | # 7 | # User must then logout and login upon completion of script 8 | # 9 | 10 | # Exit on any failure 11 | set -e 12 | 13 | # Array of supported versions 14 | declare -a versions=('trusty' 'xenial' 'yakkety'); 15 | 16 | # check the version and extract codename of ubuntu if release codename not provided by user 17 | if [ -z "$1" ]; then 18 | source /etc/lsb-release || \ 19 | (echo "Error: Release information not found, run script passing Ubuntu version codename as a parameter"; exit 1) 20 | CODENAME=${DISTRIB_CODENAME} 21 | else 22 | CODENAME=${1} 23 | fi 24 | 25 | # check version is supported 26 | if echo ${versions[@]} | grep -q -w ${CODENAME}; then 27 | echo "Installing Reactome Server prereqs for Ubuntu ${CODENAME}" 28 | else 29 | echo "Error: Ubuntu ${CODENAME} is not supported" 30 | exit 1 31 | fi 32 | 33 | # Update package lists 34 | echo "# Updating package lists" 35 | sudo apt-get update 36 | 37 | # Install CURL 38 | echo "# Installing CURL" 39 | sudo apt-get -y install curl 40 | 41 | # Install Git 42 | echo "# Installing Git" 43 | sudo apt-get -y install git 44 | 45 | # Ensure that CA certificates are installed 46 | sudo apt-get -y install apt-transport-https ca-certificates 47 | 48 | # Add Docker repository key to APT keychain 49 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 50 | 51 | # Update where APT will search for Docker Packages 52 | echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${CODENAME} stable" | \ 53 | sudo tee /etc/apt/sources.list.d/docker.list 54 | 55 | # Update package lists 56 | sudo apt-get update 57 | 58 | # Verifies APT is pulling from the correct Repository 59 | sudo apt-cache policy docker-ce 60 | 61 | # Install kernel packages which allows us to use aufs storage driver if V14 (trusty/utopic) 62 | if [ "${CODENAME}" == "trusty" ]; then 63 | echo "# Installing required kernel packages" 64 | sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual 65 | fi 66 | 67 | # Install Docker 68 | echo "# Installing Docker" 69 | sudo apt-get -y install docker-ce 70 | 71 | # Add user account to the docker group 72 | sudo usermod -aG docker $(whoami) 73 | 74 | # Install docker compose 75 | echo "# Installing Docker-Compose" 76 | sudo curl -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" \ 77 | -o /usr/local/bin/docker-compose 78 | sudo chmod +x /usr/local/bin/docker-compose 79 | 80 | 81 | # Print installation details for user 82 | echo '' 83 | echo 'Installation completed, versions installed are:' 84 | echo '' 85 | echo -n 'Docker: ' 86 | docker --version 87 | echo -n 'Docker Compose: ' 88 | docker-compose --version 89 | 90 | # Print reminder of need to logout in order for these changes to take effect! 91 | echo '' 92 | echo "Please logout then login before continuing." 93 | -------------------------------------------------------------------------------- /deprecated/prereqs-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: 4 | # 5 | # ./prereqs-ubuntu.sh 6 | # 7 | # User must then logout and login upon completion of script 8 | # 9 | 10 | # Exit on any failure 11 | set -e 12 | 13 | # Array of supported versions 14 | declare -a versions=('trusty' 'xenial' 'yakkety'); 15 | 16 | # check the version and extract codename of ubuntu if release codename not provided by user 17 | if [ -z "$1" ]; then 18 | source /etc/lsb-release || \ 19 | (echo "Error: Release information not found, run script passing Ubuntu version codename as a parameter"; exit 1) 20 | CODENAME=${DISTRIB_CODENAME} 21 | else 22 | CODENAME=${1} 23 | fi 24 | 25 | # check version is supported 26 | if echo ${versions[@]} | grep -q -w ${CODENAME}; then 27 | echo "Installing Reactome Server prereqs for Ubuntu ${CODENAME}" 28 | else 29 | echo "Error: Ubuntu ${CODENAME} is not supported" 30 | exit 1 31 | fi 32 | 33 | # Update package lists 34 | echo "# Updating package lists" 35 | sudo apt-get update 36 | 37 | # Install CURL 38 | echo "# Installing CURL" 39 | sudo apt-get -y install curl 40 | 41 | # Install Git 42 | echo "# Installing Git" 43 | sudo apt-get -y install git 44 | 45 | # Ensure that CA certificates are installed 46 | sudo apt-get -y install apt-transport-https ca-certificates 47 | 48 | # Add Docker repository key to APT keychain 49 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 50 | 51 | # Update where APT will search for Docker Packages 52 | echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${CODENAME} stable" | \ 53 | sudo tee /etc/apt/sources.list.d/docker.list 54 | 55 | # Update package lists 56 | sudo apt-get update 57 | 58 | # Verifies APT is pulling from the correct Repository 59 | sudo apt-cache policy docker-ce 60 | 61 | # Install kernel packages which allows us to use aufs storage driver if V14 (trusty/utopic) 62 | if [ "${CODENAME}" == "trusty" ]; then 63 | echo "# Installing required kernel packages" 64 | sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual 65 | fi 66 | 67 | # Install Docker 68 | echo "# Installing Docker" 69 | sudo apt-get -y install docker-ce 70 | 71 | # Add user account to the docker group 72 | sudo usermod -aG docker $(whoami) 73 | 74 | # Install docker compose 75 | echo "# Installing Docker-Compose" 76 | sudo curl -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" \ 77 | -o /usr/local/bin/docker-compose 78 | sudo chmod +x /usr/local/bin/docker-compose 79 | 80 | 81 | # Print installation details for user 82 | echo '' 83 | echo 'Installation completed, versions installed are:' 84 | echo '' 85 | echo -n 'Docker: ' 86 | docker --version 87 | echo -n 'Docker Compose: ' 88 | docker-compose --version 89 | 90 | # Print reminder of need to logout in order for these changes to take effect! 91 | echo '' 92 | echo "Please logout then login before continuing." 93 | -------------------------------------------------------------------------------- /tomcat/properties/RESTfulAPI_application-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ReactomePostMapperConfiguration.xml 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 | -------------------------------------------------------------------------------- /tomcat/java-build-mounts/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ReactomePostMapperConfiguration.xml 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 | -------------------------------------------------------------------------------- /joomla/joomla.dockerfile: -------------------------------------------------------------------------------- 1 | # Use PHP + Apache as the base layer. 2 | FROM php:7.2.13-apache 3 | # Install some packages we'll need. 4 | RUN apt-get update && apt-get install -y netcat cpanminus wget \ 5 | liblog-log4perl-perl libdbi-perl libwww-search-perl \ 6 | libtemplate-plugin-gd-perl libxml-simple-perl libcgi-pm-perl \ 7 | libemail-valid-perl libpdf-api2-perl librtf-writer-perl \ 8 | liburi-encode-perl libdbd-mysql-perl libjson-perl openssl curl && apt-get autoremove && \ 9 | cpanm Bio::Perl --notest && \ 10 | ln -s /usr/bin/perl /usr/local/bin/perl && \ 11 | docker-php-ext-install mysqli 12 | COPY ./Website /var/www/html/ 13 | RUN chmod a+x /var/www/html/cgi-bin/* && \ 14 | a2enmod rewrite && \ 15 | a2enmod ssl && \ 16 | a2enmod proxy && \ 17 | a2enmod proxy_http && \ 18 | a2enmod proxy_html && \ 19 | a2enmod cgi && \ 20 | a2enmod headers && \ 21 | a2enmod include && \ 22 | mkdir /etc/apache2/ssl 23 | 24 | # Create a self-signed certificate so SSL will work. Users should overwrite this with their own certs and keys. 25 | WORKDIR /etc/apache2/ssl 26 | RUN openssl genrsa -des3 -passout pass:xxxxx -out server.pass.key 2048 && \ 27 | openssl rsa -passin pass:xxxxx -in server.pass.key -out server.key && \ 28 | openssl req -new -key server.key -out server.csr -subj "/C=XX/ST=SomePlace/L=SomePlace/O=SomeOrg/OU=SomeDepartment/CN=joomla-sites" && \ 29 | openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt && \ 30 | rm server.csr && rm server.pass.key 31 | 32 | RUN mkdir -p /var/www/html/download/current/ehld && mkdir -p /var/www/html/Icons && mkdir -p /var/www/html/ehld-icons && \ 33 | mkdir -p /var/www/html/cgi-tmp/img-fp/current/ && chmod a+rw /var/www/html/cgi-tmp/img-fp/current/ 34 | # ADD https://reactome.org/download/current/ehlds.tgz /var/www/html/download/current/ehld.tgz 35 | # RUN cd /var/www/html/download/current/ && tar -zxf ehld.tgz && echo "$(ls ./ehld | wc -l) items, $(du -hsxc ehld/* | tail -n 1) space used." 36 | # ADD https://reactome.org/download/current/ehld/svgsummary.txt /var/www/html/download/current/ehld/svgsummary.txt 37 | # ADD https://reactome.org/icon/icon-lib-svg.tgz /var/www/html/Icons/icon-lib-svg.tgz 38 | # ADD https://reactome.org/icon/icon-lib-emf.tgz /var/www/html/Icons/icon-lib-emf.tgz 39 | # ADD https://reactome.org/icon/icon-lib-png.tgz /var/www/html/Icons/icon-lib-png.tgz 40 | 41 | RUN cd /var/www/html/download/current/ehld/ \ 42 | && wget https://reactome.org/download/current/ehld/svgsummary.txt \ 43 | && chmod a+r /var/www/html/download/current/ehld/svgsummary.txt \ 44 | && wget https://reactome.org/download/current/ehlds.tgz && tar -zxf ehlds.tgz && echo "$(ls ./ehld | wc -l) items, $(du -hsxc ehld/* | tail -n 1) space used."\ 45 | && wget https://reactome.org/icon/icon-lib-svg.tgz && tar -zxf icon-lib-svg.tgz && rm icon-lib-svg.tgz \ 46 | && wget https://reactome.org/icon/icon-lib-emf.tgz && tar -zxf icon-lib-emf.tgz && rm icon-lib-emf.tgz \ 47 | && wget https://reactome.org/icon/icon-lib-png.tgz && tar -zxf icon-lib-png.tgz && rm icon-lib-png.tgz 48 | 49 | WORKDIR /var/www/html 50 | # Set up some directories for PDF/RTF export. 51 | RUN mkdir -p cgi-tmp/rtf && chown www-data:www-data cgi-tmp/rtf \ 52 | && mkdir -p cgi-tmp/pdf && chown www-data:www-data cgi-tmp/pdf \ 53 | && chown www-data:www-data ./cgi-tmp 54 | RUN apt-get update && apt-get install git -y && git clone https://github.com/reactome/reacfoam.git 55 | -------------------------------------------------------------------------------- /content-service.jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | environment 4 | { 5 | // NOTE: this file must be executed in a directory whose name is a numeric sequence, and whose parent is named "Releases". 6 | // This is how other Jenkinsfiles in the Release process determine the current release number. 7 | RELEASE_VERSION = (pwd() =~ /Releases\/(\d+)\//)[0][1]; 8 | } 9 | 10 | stages 11 | { 12 | stage('Checkout') 13 | { 14 | steps 15 | { 16 | // Get some code from a GitHub repository 17 | git branch: 'feature/Joomla', url: 'https://github.com/reactome/container.git' 18 | } 19 | } 20 | stage('Download graphdb') 21 | { 22 | steps 23 | { 24 | fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: "reactome-${env.RELEASE_VERSION}.graphdb.tgz", targetLocation: './neo4j', url: 'https://reactome.org/download/current/reactome.graphdb.tgz', userName: '')]) 25 | } 26 | } 27 | 28 | stage("Build graphdb") 29 | { 30 | steps 31 | { 32 | dir("neo4j") 33 | { 34 | script 35 | { 36 | docker.build("reactome/graphdb:$RELEASE_VERSION --build-arg GRAPHDB_LOCATION=./reactome-${env.RELEASE_VERSION}.graphdb.tgz --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f ./neo4j_stand-alone.dockerfile") 37 | } 38 | } 39 | } 40 | } 41 | stage("Generate: solr index and diagrams (also: set up relational db)") 42 | { 43 | parallel 44 | { 45 | stage("solr-index") 46 | { 47 | steps 48 | { 49 | dir("solr") 50 | { 51 | script 52 | { 53 | docker.build("reactome/solr:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f index-builder.dockerfile") 54 | } 55 | } 56 | } 57 | } 58 | stage("mysql database and diagram files") 59 | { 60 | steps 61 | { 62 | dir("mysql") 63 | { 64 | script 65 | { 66 | docker.build("reactome/reactome-mysql:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f mysql.dockerfile") 67 | } 68 | } 69 | dir("diagram-generator") 70 | { 71 | script 72 | { 73 | docker.build("reactome/diagram-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f diagram-generator.dockerfile") 74 | } 75 | } 76 | } 77 | } 78 | } 79 | } 80 | stage ("Build content-service web application") 81 | { 82 | steps 83 | { 84 | dir("stand-alone-content-service") 85 | { 86 | script 87 | { 88 | docker.build("reactome/stand-alone-content-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f content-service.dockerfile") 89 | } 90 | } 91 | } 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /stand-alone-analysis-service/analysis-service.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release75 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | ENV PATHWAY_BROWSER_VERSION=master 4 | RUN mkdir -p /gitroot && mkdir -p /webapps 5 | WORKDIR /gitroot 6 | ENV ANALYSIS_SERVICE_VERSION=master 7 | ENV ANALYSIS_REPORT_VERSION=master 8 | ARG NEO4J_USER=neo4j 9 | ARG NEO4J_PASSWORD=neo4j-password 10 | ENV NEO4J_USER ${NEO4J_USER} 11 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 12 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 13 | ENV MVN_CMD="mvn --no-transfer-progress --global-settings /maven-settings.xml -Dmaven.repo.local=/mvn/alt-m2/ -DskipTests" 14 | COPY ./analysis-service-maven-settings.xml /maven-settings.xml 15 | RUN sed -i -e 's/.*<\/neo4j\.password>/${NEO4J_PASSWORD}<\/neo4j\.password>/g' /maven-settings.xml && \ 16 | sed -i -e 's/.*<\/neo4j\.user>/${NEO4J_USER}<\/neo4j\.user>/g' /maven-settings.xml 17 | 18 | # Build the applications 19 | RUN cd /gitroot/ && git clone https://github.com/reactome/analysis-report.git \ 20 | && cd /gitroot/analysis-report \ 21 | && git checkout $ANALYSIS_REPORT_VERSION \ 22 | && cd /gitroot/ && git clone https://github.com/reactome/analysis-service.git \ 23 | && cd /gitroot/analysis-service \ 24 | && git checkout $ANALYSIS_SERVICE_VERSION \ 25 | # Empty header/footer should be OK since this is a stand-alone version of AnalysisService. 26 | # Later, we can get a proper Reactome header/footer, if we want the AnalysisService UI to look nicer. 27 | && echo "" > /gitroot/analysis-service/src/main/webapp/WEB-INF/pages/header.jsp \ 28 | && echo "" > /gitroot/analysis-service/src/main/webapp/WEB-INF/pages/footer.jsp \ 29 | && cd /gitroot/analysis-report \ 30 | && ${MVN_CMD} clean compile package install \ 31 | && ls ./target/ \ 32 | && cd /gitroot/analysis-service \ 33 | && sed -i -e 's/http:\/\/repo\.maven/https:\/\/repo\.maven/g' pom.xml \ 34 | && ${MVN_CMD} clean compile package -P AnalysisService-Local \ 35 | && ls -lht target && mv target/*.war /webapps/ \ 36 | && rm -rf /mvn/alt-m2/ 37 | 38 | FROM reactome/analysis-core:${RELEASE_VERSION} AS analysiscorebuilder 39 | FROM reactome/graphdb:${RELEASE_VERSION} AS graphdb 40 | FROM reactome/fireworks-generator:${RELEASE_VERSION} as fireworks 41 | # Ok, now re-base the image as Tomcat 42 | FROM tomcat:8.5.35-jre8 43 | ENV EXTENSION_SCRIPT=/data/neo4j-init.sh 44 | ENV NEO4J_EDITION=community 45 | ARG NEO4J_USER=neo4j 46 | ARG NEO4J_PASSWORD=neo4j-password 47 | ENV NEO4J_USER ${NEO4J_USER} 48 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 49 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 50 | EXPOSE 8080 51 | COPY ./entrypoint.sh /analysis-service-entrypoint.sh 52 | RUN mkdir -p /usr/local/AnalysisService/analysis-results \ 53 | && useradd neo4j \ 54 | && chmod a+x /analysis-service-entrypoint.sh 55 | # Copy the analysis file 56 | COPY --from=fireworks /fireworks-json-files /tmp/fireworks 57 | COPY --from=analysiscorebuilder /output/analysis.bin /analysis.bin 58 | # Copy the web applications created in the builder stage. 59 | COPY --from=builder /webapps/ /usr/local/tomcat/webapps/ 60 | # Copy graph database 61 | COPY --from=graphdb /data/neo4j-init.sh /data/neo4j-init.sh 62 | COPY --from=graphdb /docker-entrypoint.sh /neo4j-entrypoint.sh 63 | COPY --from=graphdb /var/lib/neo4j /var/lib/neo4j 64 | COPY --from=graphdb /logs /var/lib/neo4j/logs 65 | COPY --from=graphdb /var/lib/neo4j/conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 66 | COPY --from=graphdb /data /var/lib/neo4j/data 67 | COPY ./wait-for.sh /wait-for.sh 68 | # load and set entrypoint 69 | 70 | CMD ["/analysis-service-entrypoint.sh"] 71 | RUN apt-get update && apt-get install netcat gosu procps -y && apt-get autoremove && ln -s $(which gosu) /bin/su-exec 72 | # Run this as: docker run --name reactome-analysis-service -p 8080:8080 reactome/stand-alone-analysis-service:Release71 73 | -------------------------------------------------------------------------------- /joomla/cgi-modules/GKB/URLMaker.pm: -------------------------------------------------------------------------------- 1 | package GKB::URLMaker; 2 | 3 | use strict; 4 | use Carp; 5 | use GKB::Config; 6 | 7 | sub new { 8 | my($pkg, @args) = @_; 9 | unless (scalar(@args) % 2 == 0) { 10 | confess("Odd number of arguments."); 11 | } 12 | my $self = bless {}, $pkg; 13 | for(my $i = 0; $i < @args; $i += 2) { 14 | if (uc($args[$i]) eq '-SCRIPTNAME') { 15 | $self->script_name($args[$i + 1]); 16 | } else { 17 | $args[$i] =~ s/^-//; 18 | $self->param($args[$i],$args[$i + 1]); 19 | } 20 | } 21 | return $self; 22 | } 23 | 24 | sub urlify { 25 | my $self = shift; 26 | my $force_pwb_link = $self->force_pwb_link(); 27 | my $url; 28 | 29 | if (ref $_[0] && $_[0]->is_a('Pathway') && $_[0]->stableIdentifier->[0]) { 30 | my $stable_id = $_[0]->stableIdentifier->[0]->identifier->[0]; 31 | return "http://" . get_host_name() . "/PathwayBrowser/#/$stable_id"; 32 | } 33 | 34 | unless ($url = $self->_get_cached_url) { 35 | $url = $self->script_name . '?'; 36 | while (my ($name,$ar) = each %{$self->{'param'}}) { 37 | $url .= join('&', map {"$name=$_"} @{$ar}) . '&'; 38 | } 39 | if ($force_pwb_link) { 40 | $url .= 'PWB_REDIRECT=1&'; 41 | } 42 | $self->_set_cached_url($url); 43 | } 44 | foreach (@_) { 45 | ref $_ || confess("Need GKB::Instance, got '$_'."); 46 | $url .= 'ID=' . $_->db_id . '&'; 47 | } 48 | return $url; 49 | } 50 | 51 | sub get_host_name { 52 | # chomp(my $host_name = `hostname -f`); 53 | # 54 | # return 'reactome.org' if $host_name eq 'reactomeprd1.oicr.on.ca'; 55 | # return $host_name; 56 | return $GKB::Config::HOST_NAME; 57 | #return 'localhost'; 58 | } 59 | 60 | sub force_pwb_link { 61 | my $self = shift; 62 | my $link = shift; 63 | $self->{force_pwb_link} = 1 if $link; 64 | return $self->{force_pwb_link}; 65 | } 66 | 67 | sub turn_off_pwb_link { 68 | my $self = shift; 69 | 70 | $self->{force_pwb_link} = 0; 71 | } 72 | 73 | sub urlify_db_ids { 74 | my $self = shift; 75 | my $url; 76 | unless ($url = $self->_get_cached_url) { 77 | $url = $self->script_name . '?'; 78 | while (my ($name,$ar) = each %{$self->{'param'}}) { 79 | $url .= join('&', map {"$name=$_"} @{$ar}) . '&'; 80 | } 81 | $self->_set_cached_url($url); 82 | } 83 | foreach (@_) { 84 | $url .= 'ID=' . $_ . '&'; 85 | } 86 | return $url; 87 | } 88 | 89 | sub _set_cached_url { 90 | $_[0]->{'_cached_url'} = $_[1]; 91 | } 92 | 93 | sub _get_cached_url { 94 | return $_[0]->{'_cached_url'}; 95 | } 96 | 97 | sub _delete_cached_url { 98 | delete $_[0]->{'_cached_url'}; 99 | } 100 | 101 | sub script_name { 102 | my $self = shift; 103 | if (@_) { 104 | $self->{'script_name'} = shift; 105 | $self->_delete_cached_url; 106 | } 107 | return $self->{'script_name'}; 108 | } 109 | 110 | sub delete { 111 | my ($self,$param_name) = @_; 112 | delete $self->{'param'}->{$param_name}; 113 | $self->_delete_cached_url; 114 | } 115 | 116 | sub param { 117 | my $self = shift; 118 | if (my $param_name = shift) { 119 | if (@_) { 120 | if (ref($_[0]) && (ref($_[0]) eq 'ARRAY')) { 121 | @{$self->{'param'}->{$param_name}} = @{$_[0]}; 122 | } else { 123 | @{$self->{'param'}->{$param_name}} = @_; 124 | } 125 | $self->_delete_cached_url; 126 | } else { 127 | return @{$self->{'param'}->{$param_name}}; 128 | } 129 | } else { 130 | return keys %{$self->{'param'}}; 131 | } 132 | } 133 | 134 | sub clone { 135 | my $self = shift; 136 | my ($pkg) = $self =~ /^(\S+)=/; 137 | my $clone = bless {}, $pkg; 138 | $clone->{'_cached_url'} = $self->{'_cached_url'}; 139 | $clone->{'script_name'} = $self->{'script_name'}; 140 | while (my ($name,$ar) = each %{$self->{'param'}}) { 141 | @{$clone->{'param'}->{$name}} = @{$self->{'param'}->{$name}}; 142 | } 143 | return $clone; 144 | } 145 | 146 | 1; 147 | -------------------------------------------------------------------------------- /joomla/configuration.php: -------------------------------------------------------------------------------- 1 | Please check back again soon.'; 5 | public $display_offline_message = '1'; 6 | public $offline_image = ''; 7 | public $sitename = 'Reactome Pathway Database'; 8 | public $editor = 'jce'; 9 | public $captcha = '0'; 10 | public $list_limit = '20'; 11 | public $access = '1'; 12 | public $debug = '0'; 13 | public $debug_lang = '0'; 14 | public $dbtype = 'mysqli'; 15 | public $host = 'mysql-for-joomla'; 16 | public $user = 'root'; # Set this before running the container 17 | public $password = 'root'; # Set this before running the container 18 | public $db = 'website'; 19 | public $dbprefix = 'rlp_'; 20 | public $live_site = ''; 21 | public $secret = 'joomla_secret'; 22 | public $gzip = '0'; 23 | public $error_reporting = 'default'; 24 | public $helpurl = 'https://help.joomla.org/proxy?keyref=Help{major}{minor}:{keyref}&lang={langcode}'; 25 | public $ftp_host = ''; 26 | public $ftp_port = ''; 27 | public $ftp_user = ''; 28 | public $ftp_pass = ''; 29 | public $ftp_root = ''; 30 | public $ftp_enable = '0'; 31 | public $offset = 'America/Toronto'; 32 | public $mailonline = '1'; 33 | public $mailer = 'mail'; 34 | public $mailfrom = 'yourmail@yourdomain.com'; 35 | public $fromname = 'Reactome'; 36 | public $sendmail = '/usr/sbin/sendmail'; 37 | public $smtpauth = '0'; 38 | public $smtpuser = ''; 39 | public $smtppass = ''; 40 | public $smtphost = 'localhost'; 41 | public $smtpsecure = 'none'; 42 | public $smtpport = '25'; 43 | public $caching = '0'; 44 | public $cache_handler = 'file'; 45 | public $cachetime = '15'; 46 | public $cache_platformprefix = '0'; 47 | public $MetaDesc = 'Reactome is pathway database which provides intuitive bioinformatics tools for the visualisation, interpretation and analysis of pathway knowledge.'; 48 | public $MetaKeys = 'pathway,reactions,graph,bioinformatics'; 49 | public $MetaTitle = '1'; 50 | public $MetaAuthor = '0'; 51 | public $MetaVersion = '0'; 52 | public $robots = ''; 53 | public $sef = '1'; 54 | public $sef_rewrite = '1'; 55 | public $sef_suffix = '0'; 56 | public $unicodeslugs = '0'; 57 | public $feed_limit = '10'; 58 | public $feed_email = 'none'; 59 | public $log_path = '/htdocs/Website/administrator/logs'; 60 | public $tmp_path = '/htdocs/Website/tmp'; 61 | public $lifetime = '45'; 62 | public $session_handler = 'database'; 63 | public $memcache_persist = '1'; 64 | public $memcache_compress = '0'; 65 | public $memcache_server_host = 'localhost'; 66 | public $memcache_server_port = '11211'; 67 | public $memcached_persist = '1'; 68 | public $memcached_compress = '0'; 69 | public $memcached_server_host = 'localhost'; 70 | public $memcached_server_port = '11211'; 71 | public $redis_persist = '1'; 72 | public $redis_server_host = 'localhost'; 73 | public $redis_server_port = '6379'; 74 | public $redis_server_auth = ''; 75 | public $redis_server_db = '0'; 76 | public $proxy_enable = '0'; 77 | public $proxy_host = ''; 78 | public $proxy_port = ''; 79 | public $proxy_user = ''; 80 | public $proxy_pass = ''; 81 | public $massmailoff = '0'; 82 | public $MetaRights = ''; 83 | public $sitename_pagetitles = '2'; 84 | public $force_ssl = '0'; 85 | public $session_memcache_server_host = 'localhost'; 86 | public $session_memcache_server_port = '11211'; 87 | public $session_memcached_server_host = 'localhost'; 88 | public $session_memcached_server_port = '11211'; 89 | public $frontediting = '1'; 90 | public $cookie_domain = ''; 91 | public $cookie_path = ''; 92 | public $asset_id = '1'; 93 | public $replyto = ''; 94 | public $replytoname = ''; 95 | public $shared_session = '0'; 96 | public $session_redis_server_host = 'localhost'; 97 | public $session_redis_server_port = '6379'; 98 | public $show_notice_mod = '0'; 99 | public $ga_tracking_code = 'UA-1'; 100 | } 101 | -------------------------------------------------------------------------------- /tomcat/ReactomeRESTfulAPI.dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.6.3-jdk-8 AS builder 2 | LABEL maintainer="solomon.shorser@oicr.on.ca" 3 | RUN mkdir /webapps && mkdir /gitroot && mkdir -p /mvn/alt-m2/ 4 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 5 | ENV MVN_CMD "mvn --no-transfer-progress --global-settings /mvn-settings.xml -Dmaven.repo.local=/mvn/alt-m2/" 6 | RUN apt-get update && apt-get install -y ant 7 | # To build the RESTfulAPI, we also need libsbgn and Pathway-Exchange. 8 | # Let's start by building Pathway-Exchange 9 | RUN cd /gitroot/ && git clone https://github.com/reactome/Pathway-Exchange.git \ 10 | # then we'll need libsbgn (version: "milestone2") and CuratorTool, and *they* both requires ant 11 | && cd /gitroot/ && git clone https://github.com/sbgn/libsbgn.git \ 12 | && cd /gitroot/libsbgn && git checkout milestone2 \ 13 | && cd /gitroot/ && git clone https://github.com/reactome/CuratorTool.git 14 | 15 | # Build projects from the CuratorTool - need to build reactome.jar before building RestfulAPI 16 | COPY ./java-build-mounts/CuratorToolBuild.xml /gitroot/CuratorTool/ant/CuratorToolBuild.xml 17 | COPY ./java-build-mounts/ReactomeJar.xml /gitroot/CuratorTool/ant/ReactomeJar.xml 18 | COPY ./java-build-mounts/JavaBuildPackaging.xml /gitroot/CuratorTool/ant/JavaBuildPackaging.xml 19 | COPY ./java-build-mounts/junit-4.12.jar /gitroot/CuratorTool/lib/junit/junit-4.12.jar 20 | COPY ./java-build-mounts/ant-javafx.jar /gitroot/CuratorTool/lib/ant-javafx.jar 21 | 22 | RUN cd /gitroot/libsbgn \ 23 | && ant \ 24 | && cd /gitroot/CuratorTool/ant \ 25 | && ant -buildfile ReactomeJar.xml 26 | 27 | RUN mkdir -p /mvn/alt-m2/ 28 | RUN cd /gitroot/CuratorTool/ant && $MVN_CMD install:install-file -Dfile=/gitroot/CuratorTool/reactome.jar -DartifactId=Reactome -DgroupId=org.reactome -Dpackaging=jar -Dversion=UNKNOWN_VERSION 29 | 30 | # Build Pathway-Exchange 31 | COPY ./java-build-mounts/Pathway-Exchange-pom.xml /gitroot/Pathway-Exchange/pom.xml 32 | COPY ./java-build-mounts/applicationContext.xml /gitroot/Pathway-Exchange/web/WEB-INF/applicationContext.xml 33 | # Install libs for PathwayExchange, then build PathwayExchange 34 | RUN cd /gitroot/Pathway-Exchange \ 35 | && $MVN_CMD install:install-file -Dfile=/gitroot/libsbgn/dist/org.sbgn.jar -DartifactId=sbgn -DgroupId=org.sbgn -Dpackaging=jar -Dversion=milestone2 \ 36 | && $MVN_CMD install:install-file -Dfile=./lib/celldesigner/celldesigner.jar -DgroupId=celldesigner -DartifactId=celldesigner -Dversion=UNKNOWN_VERSION -Dpackaging=jar \ 37 | && $MVN_CMD install:install-file -Dfile=./lib/protege/arq.jar -DgroupId=com.hp.hpl.jena -DartifactId=arq -Dpackaging=jar -Dversion=UNKNOWN_VERSION \ 38 | && $MVN_CMD install:install-file -Dfile=./lib/protege/protege.jar -Dpackaging=jar -DgroupId=edu.stanford.protege -DartifactId=protege -Dversion=UNKNOWN_VERSION \ 39 | && $MVN_CMD install:install-file -Dfile=./lib/protege/protege-owl.jar -Dversion=3.2 -DgroupId=edu.stanford.smi.protege -DartifactId=protege-owl -Dpackaging=jar \ 40 | && $MVN_CMD install:install-file -Dfile=lib/sbml/jsbml-0.8-rc1-with-dependencies.jar -DgroupId=org.sbml -DartifactId=jsbml -Dversion=0.8-rc1 -Dpackaging=jar \ 41 | && $MVN_CMD install:install-file -Dfile=./lib/sbml/libsbmlj.jar -DgroupId=org.sbml -DartifactId=libsbml -Dpackaging=jar -Dversion=0.8-rc1 \ 42 | && pwd && $MVN_CMD compile package install && du -hscx /mvn/alt-m2/ 43 | 44 | # Build RESTfulAPI - the one I copied as a WAR doesn't seem to work right. 45 | RUN cd /gitroot/ && git clone https://github.com/reactome/RESTfulAPI.git \ 46 | && cd /gitroot/RESTfulAPI \ 47 | && git checkout 3760bbbfb3901be4fb684af50e3ae0c51a39997b 48 | COPY ./java-build-mounts/RESTfulAPI-pom.xml /gitroot/RESTfulAPI/pom.xml 49 | COPY ./java-build-mounts/settings-docker.xml /mvn-settings.xml 50 | RUN cd /gitroot/RESTfulAPI \ 51 | && $MVN_CMD install:install-file -Dfile=/gitroot/CuratorTool/reactome.jar -DartifactId=Reactome -DgroupId=org.reactome -Dpackaging=jar -Dversion=UNKNOWN_VERSION \ 52 | && ls /gitroot/RESTfulAPI/ -lht \ 53 | && pwd && $MVN_CMD package \ 54 | && cp /gitroot/RESTfulAPI/target/ReactomeRESTfulAPI*.war /webapps/ReactomeRESTfulAPI.war && du -hscx /mvn/alt-m2/ 55 | 56 | FROM alpine:3.8 57 | COPY --from=builder /webapps/ReactomeRESTfulAPI.war /webapps/ReactomeRESTfulAPI.war 58 | -------------------------------------------------------------------------------- /tomcat/java-build-mounts/AnalysisService_mvc-dispatcher-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | NON_NULL 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 | -------------------------------------------------------------------------------- /solr/index-builder.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release74 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | 4 | RUN mkdir /gitroot 5 | # The commit ID for the "speed-up" version of search-indexer. Runs faster than normal, by using multiple threads. 6 | ENV INDEXER_VERSION=master 7 | WORKDIR /gitroot/ 8 | RUN mkdir /gitroot/search-indexer 9 | RUN git clone https://github.com/reactome/search-indexer.git && \ 10 | cd /gitroot/search-indexer && \ 11 | git checkout $INDEXER_VERSION && \ 12 | sed -i -e 's/http:\/\/repo1/https:\/\/repo1/g' pom.xml && \ 13 | sed -i -e 's/http:\/\/repo/https:\/\/repo/g' pom.xml && \ 14 | mvn --no-transfer-progress clean compile package -DskipTests && ls -lht ./target && \ 15 | mkdir /indexer && \ 16 | cp /gitroot/search-indexer/target/search-indexer-jar-with-dependencies.jar /indexer/search-indexer-jar-with-dependencies.jar && \ 17 | rm -rf ~/.m2 18 | 19 | # We'll need to get stuff from graphdb 20 | FROM reactome/graphdb:${RELEASE_VERSION} as graphdb 21 | # final base images is solr 22 | FROM solr:6.6.5-alpine 23 | USER root 24 | RUN mkdir /indexer 25 | # bring the indexer from the "builder" image. 26 | COPY --from=builder /indexer/search-indexer-jar-with-dependencies.jar /indexer/search-indexer-jar-with-dependencies.jar 27 | COPY --from=graphdb /docker-entrypoint.sh /neo4j-entrypoint.sh 28 | COPY --from=graphdb /data /data 29 | COPY --from=graphdb /var/lib/neo4j /var/lib/neo4j 30 | COPY --from=graphdb /var/lib/neo4j/bin/neo4j-admin /var/lib/neo4j/bin/neo4j-admin 31 | COPY --from=graphdb /var/lib/neo4j/conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 32 | COPY --from=builder /gitroot/search-indexer/solr-conf/reactome/ /custom-solr-conf/ 33 | 34 | 35 | # copy neo4j 36 | 37 | 38 | 39 | # RUN ls -lht /custom-solr-conf/ 40 | 41 | # setup for neo4j 42 | 43 | RUN ls -lht /var/lib/neo4j/conf/neo4j.conf 44 | # Args for neo4j user/password - I'm not sure if ENV variables get inherited 45 | # when I do "FROM ..." but this way, a user can redefine them for this 46 | # particular build. 47 | ARG NEO4J_USER=neo4j 48 | ENV NEO4J_USER=$NEO4J_USER 49 | ARG NEO4J_PASSWORD=neo4j-password 50 | ENV NEO4J_PASSWORD=$NEO4J_PASSWORD 51 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 52 | 53 | 54 | 55 | # we'll need netcat so that solr can "wait-for" neo4j to start. parallel is to 56 | # speed up the download of Icon XML Metadata files. 57 | RUN apk add parallel netcat-openbsd su-exec shadow tini 58 | 59 | # we'll need Icon XML files. 60 | COPY ./get_icon_xml_files.sh /get_icon_xml_files.sh 61 | # RUN bash /get_icon_xml_files.sh 62 | 63 | RUN mkdir /indexer/logs && chmod a+rw /indexer/logs 64 | 65 | COPY ./wait-for.sh /wait-for.sh 66 | # The Neo4j entrypoint script will be the entrypoint, and then we will explicitly 67 | # invoke the solr entrypoint before running the indexer. 68 | # ENTRYPOINT ["/data/neo4j-init.sh"] 69 | #Entry point: 70 | # docker-entrypoint.sh solr-precreate reactome 71 | # The actual command to run: 72 | # java -jar /indexer/Indexer-jar-with-dependencies.jar \ 73 | # -a neo4j -b 7474 -c $NEO4J_USER -d $NEO4J_PASSWORD \ 74 | # -e http://localhost:8983/solr/reactome -f "" -g "" \ 75 | # -i localhost -j 25 -k dummy 76 | RUN useradd neo4j 77 | EXPOSE 7474 7687 8983 78 | ENV NEO4J_EDITION=community 79 | RUN ln -s /var/lib/neo4j/conf /conf 80 | WORKDIR / 81 | 82 | # We'll also need EHLD files 83 | # RUN mkdir /tmp/ehld 84 | ADD https://reactome.org/download/current/ehlds.tgz /tmp/ehld.tgz 85 | USER root 86 | RUN chmod a+rw /tmp && chmod a+rw /tmp/ehld.tgz 87 | # RUN cd /tmp/ && tar -zxf ehld.tgz && echo "Files in /tmp/ehld " && ls ehld/* | wc -l 88 | 89 | USER solr 90 | # Create a new core. 91 | RUN solr start && solr create -c reactome -p 8983 -d /custom-solr-conf/ && solr stop 92 | COPY ./build_solr_index.sh /build_solr_index.sh 93 | USER root 94 | RUN chmod a+x /build_solr_index.sh && chown -R neo4j:neo4j /var/lib/neo4j && chown -R neo4j:neo4j /data && chmod u+s /sbin/su-exec && mkdir /logs && chmod a+rw /logs 95 | # Give the neo4j user access to the same stuff the solr user has. 96 | # RUN usermod -a solr -G neo4j 97 | USER neo4j 98 | ENV EXTENSION_SCRIPT /data/neo4j-init.sh 99 | RUN /build_solr_index.sh 100 | USER root 101 | RUN chmod a+rw /opt/solr/server/solr/reactome/data/index/write.lock && \ 102 | chmod a+rw -R /opt/solr/server/logs && \ 103 | chmod a+rw /opt/solr/server/solr/reactome/data/tlog/* 104 | USER solr 105 | -------------------------------------------------------------------------------- /diagram-generator/diagram-generator.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release75 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | 4 | RUN mkdir /gitroot 5 | ENV DIAGRAM_CONVERTER_VERSION=master 6 | WORKDIR /gitroot/ 7 | RUN git clone https://github.com/reactome-pwp/diagram-converter.git && \ 8 | cd /gitroot/diagram-converter && git checkout $DIAGRAM_CONVERTER_VERSION && \ 9 | cd src/main/resources && \ 10 | echo "log4j.logger.httpclient.wire.header=WARN" >> log4j.properties && \ 11 | echo "log4j.logger.httpclient.wire.content=WARN" >> log4j.properties && \ 12 | echo "log4j.logger.org.apache.commons.httpclient=WARN" >> log4j.properties && \ 13 | echo "log4j.logger.org.apache=WARN" >> log4j.properties && \ 14 | echo "org.neo4j=WARN" >> log4j.properties && \ 15 | echo "logging.level.org.neo4j.ogm.drivers.bolt.request.BoltRequest=WARN" >> log4j.properties && \ 16 | echo "logging.level.org.neo4j.ogm.drivers.embedded.request.EmbeddedRequest=WARN" >> log4j.properties && \ 17 | echo "org.springframework=WARN" >> log4j.properties && \ 18 | sed -i -e 's/<\/configuration>/<\/configuration>/g' logback.xml && \ 19 | cd /gitroot/diagram-converter && \ 20 | sed -i -e 's/\*\*\/logback\.xml<\/exclude>/ /g' pom.xml && \ 21 | mvn --no-transfer-progress clean compile package -DskipTests && ls -lht ./target && \ 22 | mkdir /diagram-converter && \ 23 | cp /gitroot/diagram-converter/target/diagram-converter-jar-with-dependencies.jar /diagram-converter/diagram-converter-jar-with-dependencies.jar 24 | 25 | # Now, rebase on the Reactome Neo4j image 26 | FROM reactome/graphdb:$RELEASE_VERSION as graphdb 27 | 28 | # Add MySQL layer, but name it "diagrambuilder" since this is where we will actually create the diagrams. 29 | FROM reactome/reactome-mysql:$RELEASE_VERSION as diagrambuilder 30 | COPY --from=builder /diagram-converter/diagram-converter-jar-with-dependencies.jar /diagram-converter/diagram-converter-jar-with-dependencies.jar 31 | COPY --from=graphdb /var/lib/neo4j /var/lib/neo4j 32 | COPY --from=graphdb /var/lib/neo4j/logs /var/lib/neo4j/logs 33 | COPY --from=graphdb /var/lib/neo4j/bin/neo4j-admin /var/lib/neo4j/bin/neo4j-admin 34 | COPY --from=graphdb /data /var/lib/neo4j/data 35 | COPY --from=graphdb /data/neo4j-init.sh /data/neo4j-init.sh 36 | COPY --from=graphdb /var/lib/neo4j/conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 37 | COPY --from=graphdb /docker-entrypoint.sh /neo4j-entrypoint.sh 38 | 39 | COPY ./wait-for.sh /wait-for.sh 40 | 41 | RUN useradd neo4j 42 | EXPOSE 7474 7687 8983 3306 43 | ARG NEO4J_USER=neo4j 44 | ENV NEO4J_USER=$NEO4J_USER 45 | ARG NEO4J_PASSWORD=neo4j-password 46 | ENV NEO4J_PASSWORD=$NEO4J_PASSWORD 47 | ENV NEO4J_AUTH $NEO4J_USER/$NEO4J_PASSWORD 48 | ENV MYSQL_ROOT_PASSWORD=root 49 | # Neo4j extension script setting. 50 | ENV EXTENSION_SCRIPT=/data/neo4j-init.sh 51 | ENV NEO4J_EDITION=community 52 | RUN ln -s /var/lib/neo4j/conf /conf 53 | # RUN ls -lht /data 54 | # RUN ls -lht /neo4j-data 55 | # RUN ls -lht /diagram-converter/ 56 | # RUN env 57 | WORKDIR / 58 | COPY ./generate_diagrams.sh /diagram-converter/generate_diagrams.sh 59 | # neo4j-entrypoint expects su-exec, but there doesn't seem to be a package for that. gosu should be able to do the same thing. 60 | # The sed line below is to make Java more compatible with MySQL 5.7 because I can't seem to get MySQL 5.7 working with TLSv1.2 61 | RUN apt-get update && apt-get install software-properties-common -y -qq \ 62 | && apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' \ 63 | && mkdir -p /usr/share/man/man1 && \ 64 | apt-get update && apt-get install gosu openjdk-8-jdk-headless openjdk-8-jre-headless netcat -y -qq \ 65 | && ln -s $(which gosu) /bin/su-exec \ 66 | && mkdir /diagrams \ 67 | && sed -i 's/\(jdk\.tls\.disabledAlgorithms=.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\3/g' /etc/java-8-openjdk/security/java.security \ 68 | && chmod a+x /diagram-converter/generate_diagrams.sh && /diagram-converter/generate_diagrams.sh 69 | 70 | # Ok, now that diagrams are generated, maybe we should rebase on something smaller and only copy over what we need. 71 | FROM alpine:3.8 72 | COPY --from=diagrambuilder /diagrams /diagrams 73 | COPY --from=diagrambuilder /diagram-converter/logs/ /diagram-converter-logs 74 | COPY --from=diagrambuilder /diagram-converter/reports/ /diagram-converter-reports 75 | RUN ls /diagrams | wc -l 76 | -------------------------------------------------------------------------------- /joomla/cgi-modules/GKB/FrontPage3.pm: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | GKB::FrontPage3 4 | 5 | =head1 SYNOPSIS 6 | 7 | =head1 DESCRIPTION 8 | 9 | Serves up the HTML elements that make up the front page for Reactome website 3.x. 10 | 11 | =head1 SEE ALSO 12 | 13 | =head1 AUTHOR 14 | 15 | David Croft Ecroft@ebi.ac.ukE 16 | 17 | Copyright (c) 2013 European Bioinformatics Institute and Cold Spring 18 | Harbor Laboratory. 19 | 20 | This library is free software; you can redistribute it and/or modify 21 | it under the same terms as Perl itself. See DISCLAIMER for 22 | disclaimers of warranty. 23 | 24 | =cut 25 | 26 | package GKB::FrontPage3; 27 | 28 | use Data::Dumper; 29 | use GKB::Utils; 30 | use GKB::Config; 31 | use GKB::HTMLUtils; 32 | use GKB::FileUtils; 33 | use GKB::Utils::Timer; 34 | use Capture::Tiny ':all'; 35 | use strict; 36 | use warnings; 37 | use vars qw(@ISA $AUTOLOAD %ok_field); 38 | use Bio::Root::Root; 39 | 40 | @ISA = qw(Bio::Root::Root); 41 | 42 | # List the object variables here, so that they can be checked 43 | # 44 | for my $attr 45 | (qw( 46 | title 47 | content 48 | ) ) { $ok_field{$attr}++; } 49 | 50 | sub AUTOLOAD { 51 | my $self = shift; 52 | my $attr = $AUTOLOAD; 53 | $attr =~ s/.*:://; 54 | return unless $attr =~ /[^A-Z]/; # skip DESTROY and all-cap methods 55 | $self->throw("invalid attribute method: ->$attr()") unless $ok_field{$attr}; 56 | $self->{$attr} = shift if @_; 57 | return $self->{$attr}; 58 | } 59 | 60 | sub new { 61 | my($pkg, $title) = @_; 62 | 63 | my $self = bless {}, $pkg; 64 | 65 | $self->clear_variables(); 66 | $self->title($title); 67 | $self->content($self->get_index_html_content()); 68 | 69 | return $self; 70 | } 71 | 72 | sub clear_variables { 73 | my ($self) = @_; 74 | 75 | $self->title(undef); 76 | $self->content(undef); 77 | } 78 | 79 | # Needed by subclasses to gain access to class variables defined in 80 | # this class. 81 | sub get_ok_field { 82 | return %ok_field; 83 | } 84 | 85 | sub get_header { 86 | my ($self) = @_; 87 | 88 | my $chunk = GKB::HTMLUtils->extract_chunk_from_html($self->content, '', ''); 89 | my $title = $self->title; 90 | if ($title) { 91 | $chunk =~ s/.*?<\/title>/<title>$title<\/title>/si; 92 | } 93 | my $stylesheet_url = "/stylesheet.css"; 94 | if (defined $stylesheet_url && !($stylesheet_url eq '')) { 95 | my $stylesheet_html = ""; 96 | #$stylesheet_html .= "<link rel=\"stylesheet\" type=\"text\/css\" href=\"$stylesheet_url\" />\n"; 97 | $stylesheet_html .= "<style type=\"text/css\">\n"; 98 | $stylesheet_html .= "TR.contents TD.sidebar {font-size: 100% !important; line-height: 120%;} UL.classhierarchy {line-height: 100%;} UL.classhierarchy LI A {font-size: 100% !important; padding: 0; line-height: 0;} TD.sidebar UL LI {margin-left: 3px;} A.sidebar:link {padding: 0px; margin: 0px; list-style-type: none; font-size: 100%;} A.DOI {font-size: 100% !important;}\n"; 99 | $stylesheet_html .= "</style>\n"; 100 | 101 | $chunk =~ s/(<\/head>)/$stylesheet_html$1/i; 102 | } 103 | 104 | return $chunk; 105 | } 106 | 107 | sub get_footer { 108 | my ($self) = @_; 109 | 110 | my $chunk = GKB::HTMLUtils->extract_chunk_from_html($self->content, '<!-- template-placeholder -->', ''); 111 | 112 | return $chunk; 113 | } 114 | 115 | sub get_enclosing_div_start { 116 | my ($self) = @_; 117 | 118 | #return "\n\n<!--content-->\n<div id=\"content\" style=\"width=700; min-height=400;\">\n"; 119 | return "\n\n<!--content-->\n<div id=\"r-responsive-table\" class=\"padding0 top30\">\n"; 120 | } 121 | 122 | sub get_enclosing_div_end { 123 | my ($self) = @_; 124 | 125 | return "\n</div>\n<!--close content-->\n\n"; 126 | } 127 | 128 | sub get_index_html_content { 129 | my ($self) = @_; 130 | # when running in a docker container, $host must always be localhost. 131 | # Otherwise, "joomla-sites" gets propagated to the "base" element of the template 132 | # and then none of the resources load properly. 133 | # my $host = 'localhost'; 134 | my $host = $GKB::Config::HOST_NAME; 135 | chomp $host; 136 | my $content = `wget --no-check-certificate -qO- $host/template-cgi`; 137 | $content =~ s|http:\/\/|https:\/\/|g; 138 | $content =~ s/favth\-content\-block\s?//g; 139 | return $content; 140 | } 141 | 142 | 1; 143 | -------------------------------------------------------------------------------- /test_standalone_analysis_service.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Before running this test script, start the stand-alone AnalysisService: 4 | # docker run --rm -p 8080:8080 reactome/stand-alone-analysis-service:ReleaseXX (eg:Release74; if port is already allocated locally, try '1234:8080') 5 | 6 | # Getting the path to `time` ensures that we don't use the built-in *shell* command with the same name. 7 | # This "other" time command allows some better formatting options for output. 8 | PATH_TO_TIMECMD=$(which time) 9 | 10 | # Checks valus via GET 11 | function check_vals() 12 | { 13 | ENDPOINT=$1 14 | VAL_NAME=$2 15 | JQ_FILTER=$3 16 | 17 | echo "Checking remote..." 18 | # Use jq to remove the token element - it will always cause a comparison to fail, since each server will generate a different token. 19 | $PATH_TO_TIMECMD -f %E curl --output /tmp/REMOTEOUT -s "https://reactome.org/$ENDPOINT" 20 | echo "checking local..." 21 | $PATH_TO_TIMECMD -f %E curl --output /tmp/LOCALOUT -s "http://localhost:8080/$ENDPOINT" 22 | 23 | LOCAL_VAL="" 24 | REMOTE_VAL="" 25 | # process the returned value with jq if a jq filter was given. 26 | if [ ! -z "$JQ_FILTER" ] ; then 27 | LOCAL_VAL=$(cat /tmp/LOCALOUT | jq -S "$JQ_FILTER") 28 | REMOTE_VAL=$(cat /tmp/REMOTEOUT | jq -S "$JQ_FILTER") 29 | else 30 | LOCAL_VAL=$(cat /tmp/LOCALOUT) 31 | REMOTE_VAL=$(cat /tmp/REMOTEOUT) 32 | fi 33 | # If values don't match, write them to temp files, then output the diff. 34 | if [ "$LOCAL_VAL" != "$REMOTE_VAL" ] ; then 35 | echo "$VAL_NAME don't match!" 36 | 37 | if [ ! -z "$JQ_FILTER" ] ; then 38 | echo $LOCAL_VAL | jq '.' > /tmp/${VAL_NAME}_L 39 | echo $REMOTE_VAL | jq '.' > /tmp/${VAL_NAME}_R 40 | else 41 | echo $LOCAL_VAL > /tmp/${VAL_NAME}_L 42 | echo $REMOTE_VAL > /tmp/${VAL_NAME}_R 43 | fi 44 | diff /tmp/${VAL_NAME}_L /tmp/${VAL_NAME}_R 45 | else 46 | echo -e "$VAL_NAME test passed.\n" 47 | fi 48 | } 49 | 50 | # Checks values via POST 51 | check_vals_post() 52 | { 53 | ENDPOINT=$1 54 | VAL_NAME=$2 55 | POSTDATA=$3 56 | JQ_FILTER=$4 57 | 58 | echo "Checking remote..." 59 | $PATH_TO_TIMECMD -f %E curl -X POST --output /tmp/REMOTEOUT -H "Accept: application/json" -H "content-type: text/plain" -d "$POSTDATA" -s "https://reactome.org/$ENDPOINT" 60 | echo "checking local..." 61 | $PATH_TO_TIMECMD -f %E curl -X POST --output /tmp/LOCALOUT -H "Accept: application/json" -H "content-type: text/plain" -d "$POSTDATA" -s "http://localhost:8080/$ENDPOINT" 62 | LOCAL_VAL="" 63 | REMOTE_VAL="" 64 | if [ ! -z "$JQ_FILTER" ] ; then 65 | LOCAL_VAL=$(cat /tmp/LOCALOUT | jq -S "$JQ_FILTER" ) 66 | REMOTE_VAL=$(cat /tmp/REMOTEOUT | jq -S "$JQ_FILTER" ) 67 | else 68 | LOCAL_VAL=$(cat /tmp/LOCALOUT ) 69 | REMOTE_VAL=$(cat /tmp/REMOTEOUT ) 70 | fi 71 | 72 | if [ "$LOCAL_VAL" != "$REMOTE_VAL" ] ; then 73 | echo "$VAL_NAME don't match!" 74 | # "jq '.'" ensures that JSON gets pretty-formatted before it's output to file. Makes debugging easier." 75 | echo $LOCAL_VAL | jq -S '.' > /tmp/${VAL_NAME}_L 76 | echo $REMOTE_VAL | jq -S '.' > /tmp/${VAL_NAME}_R 77 | diff /tmp/${VAL_NAME}_L /tmp/${VAL_NAME}_R 78 | else 79 | echo -e "$VAL_NAME test passed.\n" 80 | fi 81 | } 82 | 83 | echo -e "\nChecking names..." 84 | check_vals AnalysisService/database/name 'Names' 85 | 86 | echo -e "\nChecking versions..." 87 | check_vals AnalysisService/database/version 'Versions' 88 | 89 | echo -e "\nCheck identifiers lookup & projection" 90 | check_vals 'AnalysisService/identifier/BRAF/projection?interactors=true&pageSize=20&page=1&sortBy=ENTITIES_PVALUE&order=ASC&resource=TOTAL&pValue=1&includeDisease=true' 'Identifier_projection' 'del( .summary.token )' 91 | 92 | echo -e "\nCheck batch look for identifiers" 93 | check_vals_post 'AnalysisService/identifiers/?interactors=true&pageSize=20&page=1&sortBy=ENTITIES_PVALUE&order=ASC&resource=TOTAL&pValue=1&includeDisease=true' 'Identifier_batch' "BRAF, BRCA" 'del( .summary.token )' 94 | 95 | echo -e "\nCheck identifier mappings" 96 | check_vals_post 'AnalysisService/mapping/?interactors=true' 'IdentifierMapping' 'TGFBR2, 15611' '.' 97 | 98 | echo -e "\nCheck identifier mappings projection" 99 | check_vals_post 'AnalysisService/mapping/projection?interactors=true' 'IdentifierMappingProjection' 'TGFBR2, 15611' '.' 100 | 101 | echo -e "\nCheck species comparison" 102 | check_vals 'AnalysisService/species/homoSapiens/49646?pageSize=20&page=1&sortBy=ENTITIES_PVALUE&order=ASC&resource=TOTAL&pValue=1&includeDisease=true' 'SpeciesComparison' 'del( .summary.token )' 103 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | services: 3 | 4 | mysql-for-tomcat: 5 | image: reactome/reactome-mysql:$RELEASE_VERSION 6 | build: 7 | context: ./mysql 8 | dockerfile: mysql.dockerfile 9 | args: 10 | RELEASE_VERSION: $RELEASE_VERSION 11 | hostname: mysql-for-tomcat 12 | container_name: mysql-for-tomcat 13 | env_file: 14 | - tomcat.env 15 | volumes: 16 | - ./mysql/init.sh:/init.sh 17 | - ./logs/mysql/tomcat:/var/log/mysql 18 | - mysql-for-tomcat-log:/backup 19 | command: bash -c "/init.sh && exec /entrypoint.sh mysqld" 20 | 21 | neo4j-db: 22 | image: "reactome/graphdb:${RELEASE_VERSION}" 23 | build: 24 | context: ./neo4j 25 | dockerfile: neo4j_generated_from_mysql.dockerfile 26 | args: 27 | RELEASE_VERSION: $RELEASE_VERSION 28 | container_name: neo4j-db 29 | hostname: neo4j-db 30 | env_file: 31 | - neo4j.env 32 | volumes: 33 | - ./logs/neo4j/:/var/lib/neo4j/logs/ 34 | ports: 35 | - 7474:7474 36 | - 7687:7687 37 | 38 | solr: 39 | image: "reactome/solr:${RELEASE_VERSION}" 40 | container_name: solr-for-reactome 41 | hostname: solr-for-reactome 42 | build: 43 | context: ./solr 44 | dockerfile: index-builder.dockerfile 45 | args: 46 | RELEASE_VERSION: $RELEASE_VERSION 47 | ports: 48 | - 8983:8983 49 | volumes: 50 | - ./logs/solr/:/opt/solr/server/logs/:rw 51 | - ./solr/solr-security.json:/opt/solr/server/solr/security.json:rw 52 | entrypoint: solr start -f 53 | 54 | tomcat: 55 | image: reactome/tomcat 56 | container_name: tomcat-server 57 | hostname: tomcat-server 58 | build: 59 | context: ./tomcat 60 | dockerfile: tomcat.dockerfile 61 | depends_on: 62 | - mysql-for-tomcat 63 | - joomla-sites 64 | - neo4j-db 65 | - solr 66 | links: 67 | - mysql-for-tomcat 68 | - joomla-sites 69 | - neo4j-db 70 | entrypoint: bash -c "ls -lht /certs && /wait-for.sh neo4j-db:7687 -t 500 && /wait-for.sh neo4j-db:7474 -t 500 && /wait-for.sh solr-for-reactome:8983 -t 500 && /wait-for.sh mysql-for-tomcat:3306 -t 500 && /wait-for.sh joomla-sites:80 -t 500 && { echo yes | keytool -v -import -file /certs/server.crt -alias joomla-sites -keystore cacerts.jks -keypass changeit -storepass changeit || ( keytool -v -delete -alias joomla-sites -keystore cacerts.jks -storepass changeit && echo yes | keytool -v -import -file /certs/server.crt -alias joomla-sites -keystore cacerts.jks -keypass changeit -storepass changeit ) ; } && catalina.sh run" 71 | volumes: 72 | - fireworks-dir:/usr/local/tomcat/webapps/download/current/fireworks 73 | - diagrams-dir:/usr/local/tomcat/webapps/download/current/diagram 74 | - ./wait-for.sh:/wait-for.sh 75 | - ./tomcat/tomcat-users.xml:/usr/local/tomcat/conf/tomcat-users.xml 76 | - ./tomcat/tomcat-server.xml:/usr/local/tomcat/conf/server.xml 77 | - ./tomcat/tomcat-manager.xml:/usr/local/tomcat/conf/Catalina/localhost/manager.xml 78 | - ./tomcat/analysis-service/results:/usr/local/AnalysisService/analysis-results 79 | - ./tomcat/analysis-service/reports:/usr/local/AnalysisService/analysis-reports 80 | - ./logs/applications/AnalysisService:/usr/local/AnalysisService/log 81 | - ./logs/applications/ContentService:/usr/local/search/log/content-service 82 | - ./logs/applications/DataContent:/usr/local/search/log/data-content 83 | - ./logs/tomcat/:/usr/local/tomcat/logs/ #to save logs inside host directory of tomcat/logs/ 84 | - ./certificates:/certs 85 | env_file: 86 | - tomcat.env 87 | ports: 88 | - 8082:8080 89 | 90 | mysql-for-joomla: 91 | image: mysql:5.7.24 92 | hostname: mysql-for-joomla 93 | container_name: mysql-for-joomla 94 | env_file: 95 | - joomla.env 96 | volumes: 97 | - ./joomla/Website/database/:/docker-entrypoint-initdb.d 98 | - ./mysql/init.sh:/init.sh 99 | - ./logs/mysql/joomla:/var/log/mysql 100 | - mysql-for-joomla-log:/backup 101 | command: bash -c "/init.sh && exec /entrypoint.sh mysqld" 102 | 103 | joomla-sites: 104 | hostname: joomla-sites 105 | image: reactome/joomla 106 | build: 107 | context: ./joomla 108 | dockerfile: joomla.dockerfile 109 | container_name: joomla-sites 110 | links: 111 | - mysql-for-joomla 112 | depends_on: 113 | - mysql-for-joomla 114 | env_file: 115 | - joomla.env 116 | ports: 117 | - 80:80 118 | - 443:443 119 | entrypoint: bash -c "/wait-for.sh mysql-for-joomla:3306 -t 360 -- cp /etc/apache2/ssl/* /certs/ && /usr/local/bin/docker-php-entrypoint apache2-foreground" 120 | volumes: 121 | - ./wait-for.sh:/wait-for.sh 122 | - ./joomla/000-default-common.conf:/etc/apache2/sites-common/000-default-common.conf 123 | - ./joomla/000-default.conf:/etc/apache2/sites-enabled/000-default.conf 124 | - ./joomla/configuration.php:/var/www/html/configuration.php 125 | - ./certificates:/certs 126 | - ./joomla/Secrets.pm:/var/www/html/cgi-modules/GKB/Secrets.pm 127 | - ./joomla/cgi-modules/GKB/FrontPage3.pm:/var/www/html/cgi-modules/GKB/FrontPage3.pm 128 | - ./joomla/cgi-modules/GKB/Utils/InstructionLibrary.pm:/var/www/html/cgi-modules/GKB/Utils/InstructionLibrary.pm 129 | - ./joomla/cgi-modules/GKB/WebUtils.pm:/var/www/html/cgi-modules/GKB/WebUtils.pm 130 | - ./joomla/cgi-modules/GKB/Config.pm:/var/www/html/cgi-modules/GKB/Config.pm 131 | - ./joomla/cgi-modules/GKB/URLMaker.pm:/var/www/html/cgi-modules/GKB/URLMaker.pm 132 | - fireworks-dir:/var/www/html/download/current/fireworks 133 | - diagrams-dir:/var/www/html/download/current/diagram 134 | 135 | volumes: 136 | mysql-for-joomla-log: 137 | mysql-for-tomcat-log: 138 | fireworks-dir: 139 | diagrams-dir: 140 | -------------------------------------------------------------------------------- /test_standalone_content_service.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Before running this test script, start the stand-alone ContentService: 4 | # docker run --rm -p 8080:8080 reactome/stand-alone-content-service:ReleaseXX (eg:Release74; if port is already allocated locally, try '1234:8080') 5 | 6 | # get path to shell-independent "time" command. Many shells define a "time" keyword which is not what we want here. 7 | PATH_TO_TIMECMD=$(which time) 8 | 9 | # Check values at local and remote ContentService 10 | function check_vals() 11 | { 12 | ENDPOINT=$1 13 | VAL_NAME=$2 14 | 15 | echo "Checking remote..." 16 | $PATH_TO_TIMECMD -f %E curl --output /tmp/REMOTEOUT -s "https://reactome.org/$ENDPOINT" && REMOTE_VAL=$(cat /tmp/REMOTEOUT) 17 | echo "checking local..." 18 | $PATH_TO_TIMECMD -f %E curl --output /tmp/LOCALOUT -s "http://localhost:8080/$ENDPOINT" && LOCAL_VAL=$(cat /tmp/LOCALOUT) 19 | # If values from the different servers don't match, output the diff to the console. 20 | if [ "$LOCAL_VAL" != "$REMOTE_VAL" ] ; then 21 | echo "$VAL_NAME don't match!" 22 | echo $LOCAL_VAL > /tmp/${VAL_NAME}_L 23 | echo $REMOTE_VAL > /tmp/${VAL_NAME}_R 24 | diff /tmp/LOCALOUT /tmp/REMOTEOUT 25 | else 26 | echo -e "$VAL_NAME test passed.\n" 27 | fi 28 | } 29 | 30 | echo -e "\nChecking names..." 31 | check_vals ContentService/data/database/name 'Name' 32 | 33 | echo -e "\nChecking versions..." 34 | check_vals ContentService/data/database/version 'Version' 35 | 36 | echo -e "\nChecking \"discover\"..." 37 | check_vals ContentService/data/discover/R-HSA-446203 'Discovery' 38 | 39 | echo -e "\nChecking \"discover\"..." 40 | check_vals ContentService/data/discover/R-HSA-446203 'Discovery' 41 | 42 | echo -e "\nChecking diseases..." 43 | check_vals ContentService/data/diseases 'Diseases' 44 | 45 | echo -e "\nChecking disease DOIDs..." 46 | check_vals ContentService/data/diseases/doid 'Disease DOIDs' 47 | 48 | echo -e "\nChecking complex (subunits)" 49 | check_vals ContentService/data/complex/R-HSA-5674003/subunits?excludeStructures=false 'Complex (subunits)' 50 | 51 | echo -e "\nChecking entity; componentOf" 52 | check_vals ContentService/data/entity/R-HSA-199420/componentOf 'Entity - componentOf' 53 | 54 | echo -e "\nChecking event hierarchy (Human)" 55 | check_vals ContentService/data/eventsHierarchy/9606 'Human event hierarchy' 56 | 57 | # PDF diffs cause problems 58 | # echo -e "\nChecking PDF export" 59 | # check_vals 'ContentService/exporter/document/event/R-HSA-177929.pdf?level%20%5B0%20-%201%5D=1&diagramProfile=Modern&resource=total&analysisProfile=Standard' "PDF_Export" 60 | # Checking images is also not always going to work because even if a raster image is off by a pixel or two, the diff will fail. 61 | # Even SVGs fail because I guess sometimes different XML elements are added to the file in a non-deterministic way, so that the rendered images are 62 | # the same but the sources are not identical. 63 | # ...let's just stick with comparing text (JSON) responses... 64 | # echo -e "\nChecking pathway image export" 65 | # check_vals 'ContentService/exporter/diagram/R-HSA-177929.svg?quality=5&flgInteractors=true&title=true&margin=15&ehld=true&diagramProfile=Modern&resource=total&analysisProfile=Standard' "SVG_Export" 66 | # It seems like for SBGN, the order of output elements might also be non-deterministic, so I guess only SBML is going to be easy to test... 67 | 68 | # ...never mind, it seems that the elements in SBML Exports might not be in the same sequence, and it looks like even some metadata might not be exactly the same. Comparing outputs could be very difficult. 69 | # Verify that they are produced but don't freak out if they don't match. OR, use some sort of SBML-specific tool (if it exists) to check for diffs. 70 | echo -e "\nChecking SBML export" 71 | check_vals 'ContentService/exporter/event/R-HSA-5205682.sbml' 'SBML_Export' 72 | 73 | echo -e "\nChecking interactors - psiquic summary" 74 | check_vals 'ContentService/interactors/psicquic/molecule/MINT/Q13501/summary' 'Interactors_psiquic_summary' 75 | 76 | echo -e "\nChecking interactors - list of psiquic resources" 77 | check_vals 'ContentService/interactors/psicquic/resources' 'Interactors_psiquic_resources' 78 | 79 | echo -e "\nChecking interactors - pathays with molecule" 80 | check_vals 'ContentService/interactors/static/molecule/Q9BXM7-1/pathways?species=Homo%20sapiens' 'Interactors_molecule_pathways' 81 | 82 | echo -e "\nChecking mapping to UniProt" 83 | check_vals 'ContentService/data/mapping/UniProt/PTEN/reactions' 'Maping_to_UniProt' 84 | 85 | echo -e "\nChecking Orthology" 86 | check_vals 'ContentService/data/orthology/R-HSA-6799198/species/49633' 'orthology' 87 | 88 | echo -e "\nChecking participants" 89 | check_vals 'ContentService/data/participants/5205685' 'participants' 90 | 91 | echo -e "\nChecking events contained in pathways" 92 | check_vals 'ContentService/data/pathway/R-HSA-5673001/containedEvents' 'events_contained_in_pathways' 93 | 94 | echo -e "\nCheck top level pathways in species" 95 | check_vals 'ContentService/data/pathways/top/Gallus%2Bgallus' 'top_level_pathways_for_species_ggallus' 96 | 97 | echo -e "\nCheck person endpoint - search by name" 98 | check_vals 'ContentService/data/people/name/Steve%20Jupe' 'lookup_steve_jupe' 99 | 100 | echo -e "\nCheck person endpoint - pathways authoured by Person" 101 | check_vals 'ContentService/data/person/391309/authoredPathways' 'authoured_pathways' 102 | 103 | echo -e "\nCheck enhanced query" 104 | check_vals 'ContentService/data/query/enhanced/R-HSA-60140' 'query' 105 | 106 | echo -e "\nCheck cross-references lookup" 107 | check_vals 'ContentService/references/mapping/15377' 'cross-references' 108 | 109 | echo -e "\nCheck number of entries for a schema type (Pathway)" 110 | check_vals 'ContentService/data/schema/Pathway/count' 'schema_count' 111 | 112 | echo -e "\nCheck Solr" 113 | check_vals 'ContentService/search/facet_query?query=TP53' 'solr_facet_search' 114 | 115 | echo -e "\nCheck species list" 116 | check_vals 'ContentService/data/species/all' 'species_list' 117 | -------------------------------------------------------------------------------- /joomla/cgi-modules/GKB/Utils/InstructionLibrary.pm: -------------------------------------------------------------------------------- 1 | package GKB::Utils::InstructionLibrary; 2 | 3 | use strict; 4 | use vars qw(@ISA @EXPORT $XML_FORCEARRAY); 5 | use Exporter; 6 | use Carp; 7 | use GKB::Config; 8 | use XML::Simple; 9 | use Data::Dumper; 10 | use Carp; 11 | @ISA = qw(Exporter); 12 | 13 | $XML_FORCEARRAY = [qw(attributes reverse_attributes INSTRUCTION CLASS FOLLOWINGINSTRUCTION OUTPUTCLASS OUTPUTINSTRUCTION OUTPUTCONDITION)]; 14 | 15 | @EXPORT = qw($XML_FORCEARRAY); 16 | 17 | sub get_instruction_id_and_desc_for_class { 18 | my ($cls) = @_; 19 | my $library = get_library_file(); 20 | my @libraryresults; 21 | my $h = XMLin($library, ForceArray => $XML_FORCEARRAY); 22 | foreach my $elem (@{$h->{'INSTRUCTION'}}){ 23 | foreach my $class (@{$elem->{CLASS}}){ 24 | if($class eq $cls){ 25 | push @libraryresults, [$elem->{'ID'}, $elem->{DESCRIPTION}]; 26 | 27 | } 28 | } 29 | } 30 | return \@libraryresults; 31 | } 32 | 33 | sub get_instructions_for_class { 34 | my ($cls) = @_; 35 | my $library = get_library_file(); 36 | my @out; 37 | my $h = XMLin($library, ForceArray => $XML_FORCEARRAY); 38 | foreach my $elem (@{$h->{'INSTRUCTION'}}){ 39 | foreach my $class (@{$elem->{CLASS}}){ 40 | if($class eq $cls){ 41 | push @out, $elem; 42 | } 43 | } 44 | } 45 | return \@out; 46 | } 47 | 48 | sub get_instructions_for_classes { 49 | my (@clss) = @_; 50 | my %classes; 51 | map {$classes{$_}++} @clss; 52 | my $library = get_library_file(); 53 | my @out; 54 | my $h = XMLin($library, ForceArray => $XML_FORCEARRAY); 55 | foreach my $elem (@{$h->{'INSTRUCTION'}}){ 56 | foreach my $class (@{$elem->{CLASS}}){ 57 | if($classes{$class}){ 58 | push @out, $elem; 59 | } 60 | } 61 | } 62 | return \@out; 63 | } 64 | 65 | sub get_instruction_by_id { 66 | my $id = shift; 67 | my $library = get_library_file(); 68 | my $h = XMLin($library, ForceArray => $XML_FORCEARRAY); 69 | foreach my $elem (@{$h->{'INSTRUCTION'}}){ 70 | if ($elem->{'ID'} eq $id) { 71 | return $elem; 72 | } 73 | } 74 | return; 75 | } 76 | 77 | sub get_instruction_from_string { 78 | my $str = shift; 79 | my $h = XMLin($str, ForceArray => $XML_FORCEARRAY); 80 | return $h; 81 | } 82 | 83 | sub check_instruction { 84 | my $instruction = shift; 85 | 86 | if (!(defined $instruction)) { 87 | die("Undefined instruction\n"); 88 | } 89 | 90 | # No instructions should not be a failure condition 91 | if (scalar(keys(%{$instruction}))==0) { 92 | return; 93 | } 94 | 95 | unless ($instruction->{'FOLLOWINGINSTRUCTION'} || 96 | $instruction->{'OUTPUTCLASS'} || 97 | $instruction->{'OUTPUTINSTRUCTION'} || 98 | $instruction->{'OUTPUTCONDITION'} 99 | ) { 100 | die("Badly formed instruction:\n" . Dumper($instruction)); 101 | } 102 | } 103 | 104 | sub get_library_file 105 | { 106 | # When Reactome runs in a container, *this* is the correct path to the instructionlibrary 107 | return '/var/www/html/cgi-modules/instructionlibrary.xml'; 108 | } 109 | 110 | sub taboutputter_popup_form1 { 111 | my $i = shift; 112 | my $instructions = get_instructions_for_class($i->class); 113 | @{$instructions} || return ''; 114 | my $form_name = 'taboutputter_form_' . $i->db_id; 115 | # This is a truely twisted way of doing things. The problem is that forms for some reason get a "newline" 116 | # inserted before and after them. Hence they won't be on the same line with teh preceding text, which is 117 | # what I want. Hence the trickery of using an "orphan" popup menu with invisible form followwing it. 118 | # Not nice. Should be replaced with js menu. 119 | my $out = qq(\n<select onchange="document.$form_name.INSTRUCTIONID.value=value;document.$form_name.submit();">\n); 120 | $out .= qq(\t<option selected="selected" value=""> List ...</option>\n); 121 | foreach my $instr (@{$instructions}) { 122 | $out .= qq(\t<option value=") . $instr->{'ID'} . qq(">) . $instr->{'LABEL'} . qq(</option>\n); 123 | } 124 | $out .= qq(</select>\n\n); 125 | $out .= 126 | qq(<form method="get" action="/cgi-bin/taboutputter" enctype="application/x-www-form-urlencoded" name="$form_name">\n) . 127 | qq(<input type="hidden" name="DB" value=") . $i->dba->db_name . qq(" />\n). 128 | qq(<input type="hidden" name="INSTRUCTIONID" value="" />\n) . 129 | qq(<input type="hidden" name="ID" value=") . $i->db_id . qq(" />) . 130 | qq(</form>\n); 131 | return $out; 132 | } 133 | 134 | sub taboutputter_popup_form { 135 | my @a = @_; 136 | my %seen; 137 | map {$seen{$_->class}++} @a; 138 | my $instructions = get_instructions_for_classes(keys %seen); 139 | @{$instructions} || return ''; 140 | my $form_name = 'taboutputter_form_' . $a[0]->db_id; 141 | # This is a truely twisted way of doing things. The problem is that forms for some reason get a "newline" 142 | # inserted before and after them. Hence they won't be on the same line with teh preceding text, which is 143 | # what I want. Hence the trickery of using an "orphan" popup menu with invisible form followwing it. 144 | # Not nice. Should be replaced with js menu. 145 | my $out = qq(\n<select onchange="document.$form_name.INSTRUCTIONID.value=value;document.$form_name.submit();">\n); 146 | $out .= qq(\t<option selected="selected" value=""> List...</option>\n); 147 | foreach my $instr (@{$instructions}) { 148 | $out .= qq(\t<option value=") . $instr->{'ID'} . qq(">) . $instr->{'LABEL'} . qq(</option>\n); 149 | } 150 | $out .= qq(</select>\n\n); 151 | $out .= 152 | qq(<form method="get" action="/cgi-bin/taboutputter" enctype="application/x-www-form-urlencoded" name="$form_name">\n) . 153 | qq(<input type="hidden" name="DB" value=") . $a[0]->dba->db_name . qq(" />\n). 154 | qq(<input type="hidden" name="INSTRUCTIONID" value="" />\n); 155 | foreach my $i (@a) { 156 | $out .= qq(<input type="hidden" name="ID" value=") . $i->db_id . qq(" />); 157 | } 158 | $out .= qq(</form>\n); 159 | return $out; 160 | } 161 | 162 | 163 | 1; 164 | -------------------------------------------------------------------------------- /pathway-browser/pathway-browser.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release77 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | ENV PATHWAY_BROWSER_VERSION=master 4 | RUN mkdir -p /gitroot && \ 5 | mkdir -p /webapps 6 | WORKDIR /gitroot 7 | ENV ANALYSIS_SERVICE_VERSION=master 8 | ENV ANALYSIS_REPORT_VERSION=master 9 | ARG NEO4J_USER=neo4j 10 | ARG NEO4J_PASSWORD=neo4j-password 11 | ENV NEO4J_USER ${NEO4J_USER} 12 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 13 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 14 | ENV MVN_CMD="mvn --no-transfer-progress --global-settings /maven-settings.xml -Dmaven.repo.local=/mvn/alt-m2/ -DskipTests" 15 | COPY ./analysis-service-maven-settings.xml /maven-settings.xml 16 | # Now build the PathwayBrowser 17 | WORKDIR /gitroot 18 | ENV PATHWAY_BROWSER_VERSION=master 19 | 20 | # Build PathwayBrowser. Use sed to get rid of the "Downloads" tab. 21 | RUN git clone https://github.com/reactome-pwp/browser.git \ 22 | && cd /gitroot/browser \ 23 | && git checkout $PATHWAY_BROWSER_VERSION \ 24 | && cd /gitroot/browser \ 25 | && sed -i 's/\(DownloadsTab\.Display downloads = new\)/\/\/ \1/g' ./src/main/java/org/reactome/web/pwp/client/AppController.java \ 26 | && sed -i 's/\(new DownloadsTabPresenter(this\.eventBus, downloads);\)/\/\/ \1/g' ./src/main/java/org/reactome/web/pwp/client/AppController.java \ 27 | && sed -i 's/\(DETAILS_TABS\.add(downloads);\)/\/\/ \1/g' ./src/main/java/org/reactome/web/pwp/client/AppController.java \ 28 | && sed -i 's/https:\/\/127.0.0.1/http:\/\/localhost:8080/g' ./src/main/java/org/reactome/web/pwp/client/tools/analysis/tissues/TissueDistribution.java \ 29 | && sed -i 's/<neo4j\.password>.*<\/neo4j\.password>/<neo4j.password>'${NEO4J_PASSWORD}'<\/neo4j.password>/g' /maven-settings.xml \ 30 | && $MVN_CMD gwt:import-sources compile package \ 31 | && mv /gitroot/browser/target/PathwayBrowser*.war /webapps/PathwayBrowser.war 32 | 33 | # You will need to generate a Personal Access Token to access the Reacfoam repo. Save it in a file "github.token" 34 | # Make sure you give the token the permissions: repo (repo:status, repo_deployment, public_repo, repo:invite, security_events) and read:repo_hook 35 | # use "--build-arg GITHUB_TOKEN=$(cat github.token)" when you build this image. 36 | ARG GITHUB_TOKEN 37 | RUN cd /webapps && git clone https://${GITHUB_TOKEN}:x-oauth-basic@github.com/reactome-pwp/reacfoam.git && cd reacfoam && git checkout demo-version && rm -rf .git 38 | 39 | RUN git clone https://github.com/reactome/experiment-digester.git 40 | 41 | RUN cd /gitroot/experiment-digester \ 42 | && $MVN_CMD -P Experiment-Digester-Local package -DskipTests \ 43 | && ls -lht /gitroot/experiment-digester/target 44 | 45 | # Generate the experiments.bin file 46 | RUN cd /gitroot/experiment-digester && \ 47 | java -jar target/digester-importer-jar-with-dependencies.jar \ 48 | -o /experiments.bin \ 49 | -e https://www.ebi.ac.uk/gxa/experiments-content/E-PROT-3/resources/ExperimentDownloadSupplier.Proteomics/tsv && \ 50 | ls -lht /experiments.bin 51 | 52 | RUN cp /gitroot/experiment-digester/target/ExperimentDigester.war /webapps/ 53 | RUN cp /experiments.bin /webapps/experiments.bin 54 | 55 | FROM reactome/analysis-core:${RELEASE_VERSION} AS analysiscorebuilder 56 | FROM reactome/stand-alone-analysis-service:${RELEASE_VERSION} AS analysisservice 57 | # Use content-service as the final base-layer because 58 | # it already contains Tomcat, ContentService, MySQL, Neo4j, Solr, 59 | # Fireworks, and Diagrams 60 | FROM reactome/stand-alone-content-service:${RELEASE_VERSION} 61 | 62 | ENV EXTENSION_SCRIPT=/data/neo4j-init.sh 63 | ENV NEO4J_EDITION=community 64 | ARG NEO4J_USER=neo4j 65 | ARG NEO4J_PASSWORD=neo4j-password 66 | ENV NEO4J_USER ${NEO4J_USER} 67 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 68 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 69 | EXPOSE 8080 70 | 71 | # Paths for content service 72 | RUN mkdir -p /usr/local/diagram/static && \ 73 | mkdir -p /usr/local/diagram/exporter && \ 74 | mkdir -p /var/www/html/download/current/ehld && \ 75 | mkdir -p /usr/local/interactors/tuple 76 | 77 | COPY ./entrypoint.sh /entrypoint.sh 78 | RUN mkdir -p /usr/local/AnalysisService/analysis-results \ 79 | && chmod a+x /entrypoint.sh 80 | 81 | RUN mkdir -p /usr/local/tomcat/webapps/download/current/ 82 | 83 | COPY --from=analysiscorebuilder /output/analysis.bin /analysis.bin 84 | # Copy the web applications created in the builder stage. 85 | COPY --from=builder /webapps/ /usr/local/tomcat/webapps/ 86 | COPY --from=builder /webapps/experiments.bin /experiments.bin 87 | COPY --from=analysisservice /usr/local/tomcat/webapps/AnalysisService.war /usr/local/tomcat/webapps/AnalysisService.war 88 | COPY ./wait-for.sh /wait-for.sh 89 | 90 | # Set up links to fireworks files for reacfoam 91 | RUN cd /usr/local/tomcat/webapps/reacfoam/resources/dataset/fireworks \ 92 | && rm -rf * \ 93 | && for f in $(ls /usr/local/tomcat/webapps/download/current/fireworks) ; do ln /usr/local/tomcat/webapps/download/current/fireworks/$f ./$f ; done 94 | 95 | # Files needed for the PathwayBrowser 96 | ADD https://reactome.org/download/current/ehlds.tgz /usr/local/tomcat/webapps/download/current/ehld.tgz 97 | RUN cd /usr/local/tomcat/webapps/download/current && tar -zxf ehld.tgz && rm ehld.tgz 98 | ADD https://reactome.org/download/current/ehld/svgsummary.txt /usr/local/tomcat/webapps/download/current/ehld/svgsummary.txt 99 | RUN chmod a+r /usr/local/tomcat/webapps/download/current/ehld/svgsummary.txt 100 | RUN chown -R www-data:www-data /usr/local/diagram/static/* && ln -s /usr/local/diagram/static /usr/local/tomcat/webapps/download/current/diagram && chown -R www-data:www-data /usr/local/tomcat/webapps/download/current/diagram 101 | # Allow symlinks for the JSON files in /usr/local/tomcat/webapps/download/current/diagram , othwerwise, certain PwB features may not work. 102 | RUN mkdir -p /usr/local/tomcat/webapps/download/META-INF/ && \ 103 | echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Context path=\"/download\"><Resources allowLinking=\"true\"></Resources></Context>" > /usr/local/tomcat/webapps/download/META-INF/context.xml 104 | # load and set entrypoint 105 | CMD ["/entrypoint.sh"] 106 | 107 | # Run this as: docker run --name reactome-analysis-service -p 8080:8080 reactome/stand-alone-analysis-service:Release71 108 | -------------------------------------------------------------------------------- /tomcat/tomcat.dockerfile: -------------------------------------------------------------------------------- 1 | # name a whole bunch of base layers that contain pre-built components (applications and content/data files) 2 | FROM reactome/reactomerestfulapi as restfulapi 3 | FROM reactome/analysisservice as analysisservice 4 | FROM reactome/contentservice as contentservice 5 | FROM reactome/datacontent as datacontent 6 | FROM reactome/pathwaybrowser as pathwaybrowser 7 | FROM reactome/diagramjs as diagramjs 8 | FROM reactome/fireworksjs as fireworksjs 9 | FROM reactome/analysis-core as analysiscore 10 | FROM reactome/fireworks-generator as fireworks 11 | FROM reactome/diagram-generator:latest as diagramfiles 12 | FROM reactome/experiments-digester as experimentsdigester 13 | 14 | # Final layer is Tomcat. 15 | FROM tomcat:8.5.35-jre8 16 | # Copy in all the components that we need. 17 | COPY --from=restfulapi /webapps/*.war /usr/local/tomcat/webapps/ 18 | COPY --from=analysisservice /webapps/*.war /usr/local/tomcat/webapps/ 19 | COPY --from=contentservice /webapps/*.war /usr/local/tomcat/webapps/ 20 | COPY --from=datacontent /webapps/*.war /usr/local/tomcat/webapps/ 21 | COPY --from=pathwaybrowser /webapps/*.war /usr/local/tomcat/webapps/ 22 | COPY --from=diagramjs /webapps/*.war /usr/local/tomcat/webapps/ 23 | COPY --from=fireworksjs /webapps/*.war /usr/local/tomcat/webapps/ 24 | # Don't forget to copy non-WAR files: analysis.bin, diagram JSON files, and Fireworks JSON files. 25 | COPY --from=analysiscore /output/analysis.bin /analysis.bin 26 | COPY --from=fireworks /fireworks-json-files /usr/local/tomcat/webapps/download/current/fireworks 27 | COPY --from=diagramfiles /diagrams /usr/local/tomcat/webapps/download/current/diagram 28 | COPY --from=experimentsdigester /webapps/experiments.bin /experiments.bin 29 | COPY --from=experimentsdigester /webapps/*.war /usr/local/tomcat/webapps/ 30 | 31 | # The DiagramJs and FireworksJs WAR files will have version numbers in their names, so 32 | # we'll just symlink them to the names that are needed. 33 | RUN ln -s /usr/local/tomcat/webapps/diagram*.war /usr/local/tomcat/webapps/DiagramJs.war \ 34 | && ln -s /usr/local/tomcat/webapps/fireworks*.war /usr/local/tomcat/webapps/FireworksJs.war \ 35 | && mkdir -p /usr/local/interactors/tuple && mkdir -p /var/www/html/download/current/ 36 | # RUN ls -lht /usr/local/tomcat/webapps/ 37 | # RUN mkdir -p /usr/local/interactors/tuple && mkdir -p /var/www/html/download/current/ 38 | RUN apt-get update && apt-get install -y netcat zip && rm -rf /var/lib/apt/lists/* 39 | 40 | # WORKDIR /usr/local/tomcat/webapps/download/ 41 | ADD https://reactome.org/download/current/ehlds.tgz /usr/local/tomcat/webapps/download/current/ehld.tgz 42 | RUN cd /usr/local/tomcat/webapps/download/current && tar -zxf ehld.tgz && rm ehld.tgz 43 | ADD https://reactome.org/download/current/ehld/svgsummary.txt /usr/local/tomcat/webapps/download/current/ehld/svgsummary.txt 44 | RUN chmod a+r /usr/local/tomcat/webapps/download/current/ehld/svgsummary.txt 45 | # RUN mkdir -p /var/www/html/ehld-icons 46 | # ADD https://reactome.org/ehld-icons/icon-lib-svg.tgz /var/www/html/ehld-icons/icon-lib-svg.tgz 47 | # RUN cd /var/www/html/ehld-icons/ && tar -zxf icon-lib-svg.tgz 48 | # ADD https://reactome.org/ehld-icons/icon-lib-emf.tgz /var/www/html/ehld-icons/icon-lib-emf.tgz 49 | # RUN cd /var/www/html/ehld-icons/ && tar -zxf icon-lib-emf.tgz 50 | # ADD https://reactome.org/ehld-icons/icon-lib-png.tgz /var/www/html/ehld-icons/icon-lib-png.tgz 51 | # RUN cd /var/www/html/ehld-icons/ && tar -zxf icon-lib-png.tgz 52 | 53 | # Now,update the properties files in the applications. 54 | WORKDIR /usr/local/tomcat/webapps/ 55 | 56 | COPY ./properties/content-service.ogm.properties /usr/local/tomcat/webapps/WEB-INF/classes/ogm.properties 57 | # This looks a little weird, so here's what's happening. We want to update the WAR files with custom properties files. This is done inseveral steps: 58 | # 1) touch the properties file to ensure it has a newer timestamp than that of the corresponding properties file inside the zip file. 59 | # 2) zip -u - this will UPDATE the WAR file with the properties file on the same path. 60 | # 3) capture the output of this operation. if `zip -u` returns a return-code of 12, it means that zip didn't need to do anything. Sometimes this 61 | # is ok and it should NOT break the build. So if we get a 12, then exit this step with a '0'. Otherwise, return whatever other return code came back from zip. 62 | RUN { touch WEB-INF/classes/ogm.properties; zip -u ContentService.war WEB-INF/classes/ogm.properties; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 63 | COPY ./properties/content-service.service.properties /usr/local/tomcat/webapps/WEB-INF/classes/service.properties 64 | COPY ./properties/data-content.ogm.properties /usr/local/tomcat/webapps/WEB-INF/classes/ogm.properties 65 | COPY ./properties/data-content.service.properties /usr/local/tomcat/webapps/WEB-INF/classes/core.properties 66 | COPY ./properties/analysis-service.service.properties /usr/local/tomcat/webapps/WEB-INF/classes/analysis.properties 67 | COPY ./properties/RESTfulAPI_application-context.xml /usr/local/tomcat/webapps/WEB-INF/applicationContext.xml 68 | 69 | RUN { touch WEB-INF/classes/service.properties; zip -u ContentService.war WEB-INF/classes/service.properties; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 70 | RUN { touch WEB-INF/classes/ogm.properties; zip -u content.war WEB-INF/classes/ogm.properties; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 71 | RUN { touch WEB-INF/classes/core.properties; zip -u content.war WEB-INF/classes/core.properties; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 72 | RUN { touch WEB-INF/classes/analysis.properties; zip -u AnalysisService.war WEB-INF/classes/analysis.properties; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 73 | 74 | # For some reason, the ReactomeRESTfulAPI WAR sometimes makes zip complain about possible file errors, so run zip -F before trying to update the files inside it. 75 | RUN touch /usr/local/tomcat/webapps/WEB-INF/applicationContext.xml && \ 76 | zip -F ReactomeRESTfulAPI.war --out ReactomeRESTfulAPI_fixed.war && mv ReactomeRESTfulAPI_fixed.war ReactomeRESTfulAPI.war 77 | RUN { zip -u ReactomeRESTfulAPI.war WEB-INF/applicationContext.xml; rc=$?; echo $rc; if [ $rc -eq 12 ]; then exit 0; fi; exit $rc; } 78 | 79 | RUN mkdir -p /ContentService/custom && mkdir -p /AnalysisService/tokens 80 | -------------------------------------------------------------------------------- /all-services.jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline 2 | { 3 | agent any 4 | environment 5 | { 6 | // NOTE: this file must be executed in a directory whose name is a numeric sequence, and whose parent is named "Releases". 7 | // This is how other Jenkinsfiles in the Release process determine the current release number. 8 | RELEASE_VERSION = getReleaseVersionTag(); 9 | } 10 | 11 | stages 12 | { 13 | // End of probably removable code 14 | stage('Download graphdb') 15 | { 16 | steps 17 | { 18 | dir("neo4j") 19 | { 20 | script 21 | { 22 | if (!fileExists('reactome-${env.RELEASE_VERSION}.graphdb.tgz')) 23 | { 24 | fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: "reactome-${env.RELEASE_VERSION}.graphdb.tgz", targetLocation: './', url: 'https://reactome.org/download/current/reactome.graphdb.tgz', userName: '')]) 25 | } 26 | sh "ls -lht" 27 | } 28 | } 29 | } 30 | } 31 | stage("Build graphdb") 32 | { 33 | steps 34 | { 35 | dir("neo4j") 36 | { 37 | script 38 | { 39 | sh "ls -lht" 40 | docker.build("reactome/graphdb:${env.RELEASE_VERSION} --build-arg GRAPHDB_LOCATION=reactome-${env.RELEASE_VERSION}.graphdb.tgz --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f ./neo4j_stand-alone.dockerfile") 41 | } 42 | } 43 | } 44 | } 45 | stage("analysis-core") 46 | { 47 | steps 48 | { 49 | dir("analysis-core") 50 | { 51 | script 52 | { 53 | docker.build("reactome/analysis-core:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-core.dockerfile") 54 | } 55 | } 56 | } 57 | } 58 | stage("fireworks-generator") 59 | { 60 | steps 61 | { 62 | dir("fireworks-generator") 63 | { 64 | script 65 | { 66 | docker.build("reactome/fireworks-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f fireworks-generator.dockerfile") 67 | } 68 | } 69 | } 70 | } 71 | stage("mysql database and diagram files") 72 | { 73 | steps 74 | { 75 | dir("mysql") 76 | { 77 | script 78 | { 79 | docker.build("reactome/reactome-mysql:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f mysql.dockerfile") 80 | } 81 | } 82 | dir("diagram-generator") 83 | { 84 | script 85 | { 86 | docker.build("reactome/diagram-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f diagram-generator.dockerfile") 87 | } 88 | } 89 | } 90 | } 91 | stage("solr-index") 92 | { 93 | steps 94 | { 95 | dir("solr") 96 | { 97 | script 98 | { 99 | docker.build("reactome/solr:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f index-builder.dockerfile") 100 | } 101 | } 102 | } 103 | } 104 | stage ("Build web applications") 105 | { 106 | parallel 107 | { 108 | stage("Analysis Service image") 109 | { 110 | steps 111 | { 112 | dir("stand-alone-analysis-service") 113 | { 114 | script 115 | { 116 | docker.build("reactome/stand-alone-analysis-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-service.dockerfile") 117 | } 118 | } 119 | } 120 | } 121 | stage("Content Service image") 122 | { 123 | steps 124 | { 125 | dir("stand-alone-content-service") 126 | { 127 | script 128 | { 129 | docker.build("reactome/stand-alone-content-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f content-service.dockerfile") 130 | } 131 | } 132 | } 133 | } 134 | } 135 | } 136 | stage("Pathway Browser image") 137 | { 138 | steps 139 | { 140 | dir("pathway-browser") 141 | { 142 | script 143 | { 144 | // Make sure you set up the github Personal Access Token before this step runs. 145 | // you can (re-)generate your github token in Github by going to Settings -> Developer Settings -> Personal Access Token 146 | docker.build("reactome/analysis-service-and-pwb:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} --build-arg GITHUB_TOKEN=${env.GITHUB_TOKEN} -f pathway-browser.dockerfile") 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } 153 | 154 | // Gets release number from URL of job. The expectation, as mentioned above, is that the URL will have a format of 'Releases/XX', where XX is the release number. 155 | def getReleaseVersionTag() 156 | { 157 | return "Release" + (pwd() =~ /Releases\/(\d+)\//)[0][1]; 158 | } 159 | -------------------------------------------------------------------------------- /analysis-service.jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline 2 | { 3 | agent any 4 | environment 5 | { 6 | // NOTE: this file must be executed in a directory whose name is a numeric sequence, and whose parent is named "Releases". 7 | // This is how other Jenkinsfiles in the Release process determine the current release number. 8 | RELEASE_VERSION = getReleaseVersionTag(); 9 | PERSONAL_ACCESS_TOKEN = credentials('PERSONAL_ACCESS_TOKEN') 10 | } 11 | 12 | stages 13 | { 14 | // End of probably removable code 15 | stage('Download graphdb') 16 | { 17 | steps 18 | { 19 | dir("neo4j") 20 | { 21 | script 22 | { 23 | if (!fileExists('reactome-${env.RELEASE_VERSION}.graphdb.tgz')) 24 | { 25 | fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: "reactome-${env.RELEASE_VERSION}.graphdb.tgz", targetLocation: './', url: 'https://reactome.org/download/current/reactome.graphdb.tgz', userName: '')]) 26 | } 27 | sh "ls -lht" 28 | } 29 | } 30 | } 31 | } 32 | stage("Build graphdb") 33 | { 34 | steps 35 | { 36 | dir("neo4j") 37 | { 38 | script 39 | { 40 | sh "ls -lht" 41 | docker.build("reactome/graphdb:${env.RELEASE_VERSION} --no-cache --build-arg GRAPHDB_LOCATION=reactome-${env.RELEASE_VERSION}.graphdb.tgz --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f ./neo4j_stand-alone.dockerfile") 42 | } 43 | } 44 | } 45 | } 46 | stage("analysis-core") 47 | { 48 | steps 49 | { 50 | dir("analysis-core") 51 | { 52 | script 53 | { 54 | docker.build("reactome/analysis-core:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-core.dockerfile") 55 | } 56 | } 57 | } 58 | } 59 | stage("fireworks-generator") 60 | { 61 | steps 62 | { 63 | dir("fireworks-generator") 64 | { 65 | script 66 | { 67 | docker.build("reactome/fireworks-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f fireworks-generator.dockerfile") 68 | } 69 | } 70 | } 71 | } 72 | stage("mysql database and diagram files") 73 | { 74 | steps 75 | { 76 | dir("mysql") 77 | { 78 | script 79 | { 80 | docker.build("reactome/reactome-mysql:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f mysql.dockerfile") 81 | } 82 | } 83 | dir("diagram-generator") 84 | { 85 | script 86 | { 87 | docker.build("reactome/diagram-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f diagram-generator.dockerfile") 88 | } 89 | } 90 | } 91 | } 92 | stage("solr-index") 93 | { 94 | steps 95 | { 96 | dir("solr") 97 | { 98 | script 99 | { 100 | docker.build("reactome/solr:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f index-builder.dockerfile") 101 | } 102 | } 103 | } 104 | } 105 | stage ("Build web applications") 106 | { 107 | parallel 108 | { 109 | stage("Analysis Service image") 110 | { 111 | steps 112 | { 113 | dir("stand-alone-analysis-service") 114 | { 115 | script 116 | { 117 | docker.build("reactome/stand-alone-analysis-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-service.dockerfile") 118 | } 119 | } 120 | } 121 | } 122 | stage("Content Service image") 123 | { 124 | steps 125 | { 126 | dir("stand-alone-content-service") 127 | { 128 | script 129 | { 130 | docker.build("reactome/stand-alone-content-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f content-service.dockerfile") 131 | } 132 | } 133 | } 134 | } 135 | } 136 | } 137 | stage("Pathway Browser image") 138 | { 139 | steps 140 | { 141 | dir("pathway-browser") 142 | { 143 | script 144 | { 145 | // Make sure you set up the github Personal Access Token as a Secret Text credential in Jenkins with ID 'PERSONAL_ACCESS_TOKEN' before this step runs. 146 | docker.build("reactome/analysis-service-and-pwb:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} --build-arg GITHUB_TOKEN=${env.PERSONAL_ACCESS_TOKEN} -f pathway-browser.dockerfile") 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } 153 | 154 | // Gets release number from URL of job. The expectation, as mentioned above, is that the URL will have a format of 'Releases/XX', where XX is the release number. 155 | def getReleaseVersionTag() 156 | { 157 | return "Release" + (pwd() =~ /Releases\/(\d+)\//)[0][1]; 158 | } 159 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reactome Container 2 | 3 | ## Table of Contents 4 | 5 | - [Overview](#overview) 6 | - [docker-compose](#docker-compose) 7 | - [Stand-alone images](#Stand-alone-images) 8 | - [Scripts](#scripts) 9 | - [Jenkinsfiles](#jenkinsfiles) 10 | 11 | ## Overview 12 | 13 | [Reactome](http://reactome.org/) is a free, open-source, curated and peer reviewed pathway database. It is an online bioinformatics database of human biology described in molecular terms. It is an on-line encyclopedia of core human pathways. [Reactome Wiki](http://wiki.reactome.org/index.php/Main_Page) provides more details about reactome. 14 | 15 | There are two ways to use the contents of this repository. The first is to run a set of docker containers connected to each other with docker-compose. This is intended to replicate the Reactome production environment as closely as possible. 16 | 17 | The second way is to build and run a set of stand-alone containers that only provide a single, independent service. 18 | 19 | Be aware that building these images can be a resource-intensive process. You will want to ensure you have about 30 GB free to build the largest images. The final images are not that big, but docker will use up more disk space while its building. Some image-builds may also require > 10 GB of RAM while building (Note: these numbers are estimates, based on observations made while building on one specific machine - resource usage might be different with different OS/hardware configurations). 20 | 21 | ### docker-compose 22 | 23 | This option will create and run the following containers: 24 | 25 | - mysql-for-tomcat - This contains the Reactome's biological pathways, as a relational database. 26 | - mysql-for-joomla - THis contains Reactome's CMS (Joomla) content. 27 | - neo4j-db - This contains the Reactome's biological pathways, as a graph database. 28 | - solr - This contains Reactome's solr index. 29 | - tomcat - This contains Tomcat, and all of the Reactome web applications. 30 | - joomla-sites - This contains the Reactome CMS (Reactome uses Joomla). 31 | 32 | You can build these containers with a docker-compose command: 33 | ```bash 34 | $ docker-compose build 35 | ``` 36 | 37 | You can run them with a run command (include the `-d` option if you want them to run in the background): 38 | ```bash 39 | $ docker-compose up 40 | ``` 41 | 42 | **NOTE** At the time of writing (2021-07-08), the docker-compose setup is not actively used and some parts of it may be out-of-date. 43 | 44 | ### Stand-alone images 45 | 46 | This option will help you build a series of stand-alone images that contain just enough to run a single Reactome service. The images are: 47 | 48 | - graphdb - This will create a docker image that contains Neo4j and the Reactome graph database. 49 | - stand-alone-content-service - This will create a docker image that contains the ContentService web application, and any supporting components (Neo4j, MySQL, Tomcat, Solr) 50 | - stand-alone-analysis-service - This will create a docker image that contains the AnalysisService web application, and any supporting components (Neo4j, Tomcat) 51 | - analysis-service-and-pwb - This will create a docker image that contains the PathwayBrowser and AnalysisService web applications, and any supporting components (Neo4j, MySQL, Tomcat, Solr, ContentService) 52 | 53 | #### graphdb 54 | In the [neo4j](./neo4j) directory, there are two dockerfiles: `neo4j_generated_from_mysql.dockerfile` & `neo4j_stand-alone.dockerfile`. `neo4j_generated_from_mysql.dockerfile` will build the Reactome graphdb docker image from the MySQL database using the [graph-importer](https://github.com/reactome/graph-importer). `neo4j_stand-alone.dockerfile` will build the docker image by downloading a pre-existing graph database from the Reactome [download page](https://reactome.org/download-data). 55 | 56 | #### stand-alone-content-service 57 | In the [stand-alone-content-service](./stand-alone-content-service) directory, there is a docker file named `content-service.dockerfile` that can be used to build a docker image that contains the ContentService, and all supporting components. 58 | 59 | #### stand-alone-analysis-service 60 | In the [stand-alone-analysis-service](./stand-alone-analysis-service) directory, there is a docker file named `analysis-service.dockerfile`. This will let you build a docker image that contains the AnalysisService and all supporting components. 61 | 62 | #### analysis-service-and-pathwaybrowser 63 | In the [pathway-browser](./pathway-browser) directory, there is a dockerfile named `pathway-browser.dockerfile`. This file will let you build a docker image that contains the PathwayBrowser & the Analysis Service and all supporting components. 64 | 65 | ### Scripts 66 | There are a few convenience script to help build the stand-alone docker images. 67 | 68 | - build_all.sh 69 | - build_browser_and_analysisservice.sh 70 | - build_standalone_analysisservice.sh 71 | - build_standalone_content_service.sh 72 | 73 | #### build_all.sh 74 | This script builds all of the images needed to run the docker-compose setup. Be aware that the docker-compose setup is not actively used at the moment (2021-07-08) so this script might be out of date. 75 | 76 | #### build_browser_and_analysisservice.sh 77 | This script will build all of the images neede to build the final `stand-alone-analysis-service` image. It does not take any arguments. Be sure to update the value for `$RELEASE_VERSION` when you are running it for a new release. 78 | 79 | #### build_standalone_analysisservice.sh 80 | This script will build all of the images neede to build the final `stand-alone-analysis-service` image. It does not take any arguments. Be sure to update the value for `$RELEASE_VERSION` when you are running it for a new release. 81 | 82 | #### build_standalone_contentservice.sh 83 | This script will build all of the images neede to build the final `stand-alone-content-service` image. It does not take any arguments. Be sure to update the value for `$RELEASE_VERSION` when you are running it for a new release. 84 | 85 | ### Jenkinsfiles 86 | There are a few Jenkinsfiles that can be used to build the docker images from Jenkins. 87 | 88 | - all-services.jenkinsfile - This file will build docker images for `stand-alone-analysis-service`, `stand-alone-analysis-service`, `stand-alone-analysis-service`, and `graphdb`. 89 | - analysis-service.jenkinsfile - This file will build docker images for `stand-alone-analysis-service`. NOTE: `all-services.jenkinsfile` is what's currently used in the Jenkins setup, so `stand-alone-analysis-service` might not be up to date. 90 | - content-service.jenkinsfile - This file will build docker images for `stand-alone-content-service`. NOTE: `all-services.jenkinsfile` is what's currently used in the Jenkins setup, so `stand-alone-content-service` might not be up to date. 91 | -------------------------------------------------------------------------------- /stand-alone-content-service/content-service.dockerfile: -------------------------------------------------------------------------------- 1 | ARG RELEASE_VERSION=Release77 2 | FROM maven:3.6.3-jdk-8 AS builder 3 | 4 | RUN mkdir -p /gitroot 5 | WORKDIR /gitroot 6 | LABEL maintainer="solomon.shorser@oicr.on.ca" 7 | 8 | # Build the ContentService application 9 | ENV CONTENT_SERVICE_VERSION=master 10 | 11 | # Build the content service 12 | COPY ./content-service-maven-settings.xml /mvn-settings.xml 13 | ARG NEO4J_USER=neo4j 14 | ARG NEO4J_PASSWORD=neo4j-password 15 | ENV NEO4J_USER ${NEO4J_USER} 16 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 17 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 18 | ENV MVN_CMD "mvn -DskipTests --no-transfer-progress --global-settings /mvn-settings.xml" 19 | RUN cd /gitroot/ && git clone https://github.com/reactome/content-service.git && \ 20 | cd /gitroot/content-service && \ 21 | git checkout $CONTENT_SERVICE_VERSION && \ 22 | cd /gitroot/content-service/src/main/resources && \ 23 | # Set logging levels to WARN - otherwise there is a lot of noise on the console. 24 | echo "log4j.logger.httpclient.wire.header=WARN" >> log4j.properties && echo "log4j.logger.httpclient.wire.content=WARN" >> log4j.properties && echo "log4j.logger.org.apache.commons.httpclient=WARN" >> log4j.properties && \ 25 | sed -i -e 's/<\/configuration>/<logger name="org.apache" level="WARN"\/><logger name="httpclient" level="WARN"\/><\/configuration>/g' logback.xml && \ 26 | # an empty header/footer is probably OK. The files just need to be present. 27 | cd /gitroot/content-service/src/main/webapp/WEB-INF/pages/ && touch header.jsp && touch footer.jsp && \ 28 | mkdir /webapps && \ 29 | sed -i -e 's/<neo4j\.password>.*<\/neo4j\.password>/<neo4j\.password>${NEO4J_PASSWORD}<\/neo4j\.password>/g' /mvn-settings.xml && \ 30 | sed -i -e 's/<neo4j\.user>.*<\/neo4j\.user>/<neo4j\.user>${NEO4J_USER}<\/neo4j\.user>/g' /mvn-settings.xml && \ 31 | # Build the applications 32 | cd /gitroot/content-service && ${MVN_CMD} package -P ContentService-Local && \ 33 | cp /gitroot/content-service/target/ContentService*.war /webapps/ContentService.war && rm -rf ~/.m2 34 | 35 | # Get graph database from existing image. 36 | FROM reactome/graphdb:${RELEASE_VERSION} AS graphdb 37 | # Get solr index 38 | FROM reactome/solr:${RELEASE_VERSION} as solr 39 | # Get diagram files. 40 | FROM reactome/diagram-generator:${RELEASE_VERSION} as diagrams 41 | # Get Fireworks files 42 | FROM reactome/fireworks-generator:${RELEASE_VERSION} as fireworks 43 | # Need relational database for SBML export 44 | FROM reactome/reactome-mysql:${RELEASE_VERSION} as relationaldb 45 | # Final re-base will be Tomcat 46 | FROM tomcat:8.5.35-jre8 47 | 48 | ENV EXTENSION_SCRIPT=/data/neo4j-init.sh 49 | ENV NEO4J_EDITION=community 50 | # We'll need a neo4j and solr user 51 | RUN useradd neo4j 52 | RUN useradd solr 53 | 54 | EXPOSE 8080 55 | 56 | # Paths for content service 57 | RUN mkdir -p /usr/local/diagram/static && \ 58 | mkdir -p /usr/local/diagram/exporter && \ 59 | mkdir -p /var/www/html/download/current/ehld && \ 60 | mkdir -p /usr/local/interactors/tuple && \ 61 | apt-get update && apt-get install lsb-release -y && \ 62 | apt-get install netcat gosu procps mlocate -y && \ 63 | apt-get autoremove && ln -s $(which gosu) /bin/su-exec 64 | 65 | RUN wget --progress=bar:force https://downloads.mysql.com/archives/get/p/23/file/mysql-server_5.7.33-1ubuntu18.04_amd64.deb-bundle.tar && \ 66 | apt-get update && apt-get install libaio1 libc6 libmecab2 libnuma1 perl -y && \ 67 | # MySQL requires newer version of libc6 than what is already in this docker image 68 | tar -xf mysql-server_5.7.33-1ubuntu18.04_amd64.deb-bundle.tar && ls -lht *.deb && \ 69 | wget --progress=bar:force http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-3ubuntu1_amd64.deb && \ 70 | dpkg -i libc6_2.27-3ubuntu1_amd64.deb && \ 71 | # OBVIOUSLY don't expose this container to the outside world! Or change the password here *AND* in the application config. 72 | echo 'mysql-community-server-5.7.33 mysql-community-server/root_password password root' | debconf-set-selections && \ 73 | echo 'mysql-community-server mysql-community-server/root_password password root' | debconf-set-selections && \ 74 | dpkg -i mysql-common_5.7.33-1ubuntu18.04_amd64.deb && \ 75 | dpkg -i mysql-community-client_5.7.33-1ubuntu18.04_amd64.deb && \ 76 | dpkg -i mysql-client_5.7.33-1ubuntu18.04_amd64.deb && \ 77 | dpkg -i mysql-community-server_5.7.33-1ubuntu18.04_amd64.deb && \ 78 | rm -rf *.deb mysql-server_5.7.33-1ubuntu18.04_amd64.deb-bundle.tar 79 | 80 | # OR maybe just install MySQL from https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.34-linux-glibc2.12-i686.tar.gz 81 | # load and set entrypoint 82 | COPY ./wait-for.sh /wait-for.sh 83 | COPY ./entrypoint.sh /content-service-entrypoint.sh 84 | ARG NEO4J_USER=neo4j 85 | ARG NEO4J_PASSWORD=neo4j-password 86 | ENV NEO4J_USER ${NEO4J_USER} 87 | ENV NEO4J_PASSWORD ${NEO4J_PASSWORD} 88 | ENV NEO4J_AUTH="${NEO4J_USER}/${NEO4J_PASSWORD}" 89 | 90 | # Copy the web applications created in the builder stage. 91 | COPY --from=builder /webapps/ /usr/local/tomcat/webapps/ 92 | # Copy the MySQL database 93 | COPY --from=relationaldb /data/mysql /var/lib/mysql 94 | # Copy graph database 95 | COPY --from=graphdb /var/lib/neo4j /var/lib/neo4j 96 | COPY --from=graphdb /var/lib/neo4j/logs /var/lib/neo4j/logs 97 | COPY --from=graphdb /logs /var/lib/neo4j/logs 98 | COPY --from=graphdb /var/lib/neo4j/bin/neo4j-admin /var/lib/neo4j/bin/neo4j-admin 99 | COPY --from=graphdb /data/neo4j-init.sh /data/neo4j-init.sh 100 | COPY --from=graphdb /var/lib/neo4j/conf/neo4j.conf /var/lib/neo4j/conf/neo4j.conf 101 | COPY --from=graphdb /docker-entrypoint.sh /neo4j-entrypoint.sh 102 | COPY --from=graphdb /data /var/lib/neo4j/data 103 | COPY --from=solr /opt/docker-solr /opt/docker-solr 104 | COPY --from=solr /opt/mysolrhome /opt/mysolrhome 105 | COPY --from=solr /opt/solr /opt/solr 106 | COPY --from=solr /custom-solr-conf /custom-solr-conf 107 | COPY --from=solr /docker-entrypoint-initdb.d /docker-entrypoint-initdb.d 108 | COPY --from=diagrams /diagrams /usr/local/diagram/static 109 | COPY --from=fireworks /fireworks-json-files /usr/local/tomcat/webapps/download/current/fireworks 110 | RUN chmod a+x /content-service-entrypoint.sh 111 | CMD ["/content-service-entrypoint.sh"] 112 | 113 | # Run this as: docker run --name reactome-content-service -p 8888:8080 reactome/stand-alone-content-service:R71 114 | # Access in you browser: http://localhost:8888/ContentService - this will let you see the various services. 115 | # To use from the command-line: 116 | # curl -X GET "http://localhost:8888/ContentService/data/complex/R-HSA-5674003/subunits?excludeStructures=false" -H "accept: application/json" 117 | # For exporter endpoints the return PDF files or images, be sure to use "--output FILE" with curl. For example: 118 | # curl --output R-HSA-177929_event.PDF -X GET "http://localhost:8888/ContentService/exporter/document/event/R-HSA-177929.pdf?level%20%5B0%20-%201%5D=1&diagramProfile=Modern&resource=total&analysisProfile=Standard" -H "accept: application/pdf" 119 | -------------------------------------------------------------------------------- /stand-alone-content-service/content-service-maven-settings.xml: -------------------------------------------------------------------------------- 1 | <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 4 | https://maven.apache.org/xsd/settings-1.0.0.xsd"> 5 | <profiles> 6 | <profile> 7 | <id>ContentService-Local</id> 8 | <properties> 9 | <!-- Neo4j Configuration --> 10 | <neo4j.host>localhost</neo4j.host> 11 | <neo4j.port>7474</neo4j.port> 12 | <neo4j.user>neo4j</neo4j.user> 13 | <neo4j.password>neo4j-password</neo4j.password> 14 | <!-- SolR Configuration --> 15 | <solr.host>http://localhost:8983/solr/</solr.host> 16 | <solr.user>solr</solr.user> 17 | <solr.password>solr</solr.password> 18 | <solr.core>reactome</solr.core> 19 | <!-- Interators Database --> 20 | <interactors.SQLite>/interactors.db</interactors.SQLite> 21 | <!-- Logging --> 22 | <logging.dir>/usr/local/search/log/content-service</logging.dir> 23 | <logging.database>${logging.dir}/search.db</logging.database> 24 | <logging.level>WARN</logging.level> 25 | <!-- Mail Configuration, using FakeSMTP --> 26 | <!-- Properties are ready to use GMail, etc. --> 27 | <mail.host>localhost</mail.host> 28 | <mail.port>8081</mail.port> 29 | <mail.username>username</mail.username> 30 | <mail.password>password</mail.password> 31 | <mail.enable.auth>false</mail.enable.auth> 32 | <mail.error.dest>helpdesk@mycompany.co.uk</mail.error.dest> 33 | <mail.support.dest>helpdesk@mycompany.co.uk</mail.support.dest> 34 | <mail.to>helpdesk@mycompany.co.uk</mail.to> 35 | <!-- Reactome Server to query header and footer --> 36 | <template.server>https://joomla-sites/</template.server> 37 | <!-- Interactor custom folder --> 38 | <tuples.uploaded.files.folder>/usr/local/interactors/tuple</tuples.uploaded.files.folder> 39 | <!-- 40 | The cron has to match 6 fields which are: second, minute, hour, day of month, month, day(s) of week 41 | e.g run every 10 minutes => 0 */10 * * * * 42 | (*) - match any 43 | */X - means every "X" 44 | --> 45 | <psicquic.resources.cache.cron>0 */59 * * * *</psicquic.resources.cache.cron> 46 | <!-- PPTX Exporter --> 47 | <diagram.json.folder>/usr/local/diagram/static</diagram.json.folder> 48 | <diagram.exporter.temp.folder>/usr/local/diagram/exporter</diagram.exporter.temp.folder> 49 | <!-- AOP: Do not enable. --> 50 | <aop.enabled>false</aop.enabled> 51 | <ehld.folder>/var/www/html/download/current/ehld</ehld.folder> 52 | <svg.summary.file>/var/www/html/download/current/ehld/svgsummary.txt</svg.summary.file> 53 | <analysis.server>https://localhost/</analysis.server> 54 | <startup.notification>false</startup.notification> 55 | <fireworks.json.folder>/usr/local/tomcat/webapps/download/current/fireworks</fireworks.json.folder> 56 | <report.user>report_user</report.user> 57 | <report.password>report_user</report.password> 58 | <!-- MySQL is needed for SBML Export --> 59 | <mysql.host>localhost</mysql.host> 60 | <mysql.port>3306</mysql.port> 61 | <mysql.user>root</mysql.user> 62 | <mysql.password>root</mysql.password> 63 | <mysql.reactome.database>current</mysql.reactome.database> 64 | </properties> 65 | <repositories> 66 | <!-- MAVEN central --> 67 | <repository> 68 | <id>central</id> 69 | <name>Maven Repository Switchboard</name> 70 | <layout>default</layout> 71 | <url>https://repo1.maven.org/maven2</url> 72 | <snapshots> 73 | <enabled>false</enabled> 74 | </snapshots> 75 | </repository> 76 | <repository> 77 | <id>central-bck</id> 78 | <name>Maven Repository Switchboard</name> 79 | <layout>default</layout> 80 | <url>https://repo1.maven.org/maven/</url> 81 | <snapshots> 82 | <enabled>false</enabled> 83 | </snapshots> 84 | </repository> 85 | <!-- EBI repo --> 86 | <repository> 87 | <id>nexus-ebi-repo</id> 88 | <name>The EBI internal repository</name> 89 | <url>http://www.ebi.ac.uk/Tools/maven/repos/content/groups/ebi-repo/</url> 90 | <releases> 91 | <enabled>true</enabled> 92 | </releases> 93 | <snapshots> 94 | <enabled>false</enabled> 95 | </snapshots> 96 | </repository> 97 | <!-- EBI SNAPSHOT repo --> 98 | <repository> 99 | <id>nexus-ebi-snapshot-repo</id> 100 | <name>The EBI internal snapshot repository</name> 101 | <url>http://www.ebi.ac.uk/Tools/maven/repos/content/groups/ebi-snapshots/</url> 102 | <releases> 103 | <enabled>false</enabled> 104 | </releases> 105 | <snapshots> 106 | <enabled>true</enabled> 107 | </snapshots> 108 | </repository> 109 | <repository> 110 | <id>com.springsource.repository.bundles.release</id> 111 | <name>EBR Spring Release Repository</name> 112 | <url>http://repository.springsource.com/maven/bundles/release</url> 113 | </repository> 114 | <repository> 115 | <id>com.springsource.repository.bundles.external</id> 116 | <name>EBR External Release Repository</name> 117 | <url>http://repository.springsource.com/maven/bundles/external</url> 118 | </repository> 119 | <repository> 120 | <id>JBoss 3rd party</id> 121 | <name>JBoss 3rd party</name> 122 | <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/</url> 123 | </repository> 124 | </repositories> 125 | </profile> 126 | </profiles> 127 | </settings> 128 | --------------------------------------------------------------------------------