-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker builds for importer and webapp
- Loading branch information
Showing
9 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## How to build the importer docker image | ||
|
||
1. Build Limelight | ||
|
||
``` | ||
# go to root directory of this repo | ||
cd ../.. | ||
# use docker to build the project | ||
sudo docker run --rm -it --user $(id -u):$(id -g) -v `pwd`:`pwd` -w `pwd` --env HOME=. --entrypoint ant mriffle/build-limelight -f ant__build_all_limelight.xml | ||
``` | ||
|
||
See https://github.com/yeastrc/limelight-build-docker for more information. | ||
|
||
2. Copy importer executable jars into this directory | ||
|
||
``` | ||
cd docker/importer | ||
cp ../../deploy/limelightImporter_XMLFile_ScanFiles.jar ./ | ||
cp ../../deploy/limelightRunImporter.jar ./ | ||
``` | ||
|
||
3. Build the Docker image | ||
|
||
``` | ||
sudo docker image build -t mriffle/limelight-importer ./ | ||
``` | ||
|
||
Tag as desired. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM amazoncorretto:11-alpine-jdk | ||
|
||
COPY db_config_file.properties /usr/local/bin/ | ||
COPY run_importer_config_file.properties /usr/local/bin/ | ||
COPY importProxlXML.jar /usr/local/bin/ | ||
COPY runImportProxlXML.jar /usr/local/bin/ | ||
|
||
ENTRYPOINT ["java", "-jar", "/usr/local/bin/runImportProxlXML.jar", "-c", "/usr/local/bin/run_importer_config_file.properties"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
# db_config_file.properties | ||
|
||
# Sample config file. | ||
|
||
# Copy this file to the folder 'config_dir__do_not_check_contents_into_git' | ||
# and configure it. | ||
|
||
# Then build this Proxl Importer Jar | ||
|
||
#username= | ||
#password= | ||
#dbHost= | ||
#dbPort= | ||
|
||
|
||
# override database names if changed from defaults | ||
|
||
proxl.db.name=proxl | ||
|
||
# nrseq.db.name= | ||
|
||
|
||
|
||
################### | ||
|
||
## Non-DB Configuration. | ||
|
||
## !!! These Only read if the config file location is passed in on the command line, not embedded in the JAR. | ||
|
||
########### | ||
|
||
# Send Scan File location to Spectral Storage Service rather than the file contents | ||
|
||
# spectral.storage.send.scan.file.location= | ||
|
||
spectral.storage.send.scan.file.location=true | ||
|
||
### | ||
|
||
# Only send if scan file path start with this string. | ||
# (Set to match configuration in spectral storage accept value of: submitted.scan.file.path.restrictions=) | ||
|
||
spectral.storage.send.scan.file.location.if.path.starts.with=/data/proxl_upload/ | ||
|
||
########### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# run_importer_config_file.properties | ||
|
||
# Sample config file. | ||
|
||
|
||
# Wait time until next check for an import to process, in seconds. Defaults to 5 seconds in the program | ||
|
||
wait.time.for.next.check.for.import.to.process=60 | ||
|
||
|
||
# The path including the program for the Java executable. | ||
|
||
# This is required if the java program is not on the PATH for the user that will be running this program. | ||
# If java was installed using an installer or package manager, this probably is not required. | ||
# If running "java -version" on the command line fails or is the wrong version, | ||
|
||
#java.executable.with.path= | ||
|
||
# importer jar with path | ||
|
||
importer.jar.with.path=/usr/local/bin/importProxlXML.jar | ||
|
||
|
||
# optional importer config file with path if a db_config_file.properties hasn't been rolled into the importer jar | ||
# This string is passed to the importer with the "-c" command line parameter | ||
|
||
importer.db.config.file.with.path=/usr/local/bin/db_config_file.properties | ||
|
||
# Optional PID file to track run Importer. | ||
# If used, must match filename/path in scripts: | ||
# z_run__runImportProxlXML.jar_StartBackground_ForRestartIfNotRunningScript.sh | ||
# z_restart_runImportProxlXML.jar_if_not_running.sh | ||
#importer.pid.file.with.path= | ||
|
||
|
||
# Example for web app on same machine at TOMCAT HTTP port | ||
# proxl.web.app.base.url=http://localhost:8080/proxl/ | ||
|
||
proxl.web.app.base.url=http://proxl:8080/proxl/ | ||
|
||
#username= | ||
#password= | ||
#dbHost= | ||
#dbPort= | ||
|
||
|
||
# override database names if changed from defaults | ||
|
||
proxl.db.name=proxl | ||
|
||
# nrseq.db.name= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## How to build the importer docker image | ||
|
||
1. Build Limelight | ||
|
||
``` | ||
# go to root directory of this repo | ||
cd ../.. | ||
# use docker to build the project | ||
sudo docker run --rm -it --user $(id -u):$(id -g) -v `pwd`:`pwd` -w `pwd` --env HOME=. --entrypoint ant mriffle/build-limelight -f ant__build_all_limelight.xml | ||
``` | ||
|
||
See https://github.com/yeastrc/limelight-build-docker for more information. | ||
|
||
2. Copy war file into this directory | ||
|
||
``` | ||
cd docker/webapp | ||
cp ../../deploy/limelight.war ./ | ||
``` | ||
|
||
3. Build the Docker image | ||
|
||
``` | ||
sudo docker image build -t mriffle/limelight-webapp ./ | ||
``` | ||
|
||
Tag as desired. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM tomcat:9-jdk11-corretto | ||
MAINTAINER Michael Riffle <mriffle@uw.edu> | ||
|
||
COPY mysql-connector-java-8.0.26.jar /usr/local/tomcat/lib | ||
COPY context.xml /usr/local/tomcat/conf | ||
COPY setenv.sh /usr/local/tomcat/bin | ||
|
||
COPY proxl.war /usr/local/tomcat/webapps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!-- The contents of this file will be loaded for each web application --> | ||
<Context> | ||
|
||
<!-- Default set of monitored resources --> | ||
<WatchedResource>WEB-INF/web.xml</WatchedResource> | ||
|
||
<Resource name="jdbc/proxl" | ||
auth="Container" | ||
type="javax.sql.DataSource" | ||
factory="org.apache.commons.dbcp2.BasicDataSourceFactory" | ||
maxTotal="300" | ||
maxIdle="200" | ||
minIdle="200" | ||
maxWaitMillis="1000" | ||
|
||
minEvictableIdleTimeMillis="21600000" | ||
timeBetweenEvictionRunsMillis="30000" | ||
|
||
validationQuery="select 1 from dual" | ||
testOnBorrow="true" | ||
|
||
|
||
username="${PROXL_MYSQL_USER}" | ||
password="${PROXL_MYSQL_PASSWORD}" | ||
driverClassName="com.mysql.jdbc.Driver" | ||
|
||
url="jdbc:mysql://db:3306/${PROXL_DATABASE_NAME}?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8" | ||
/> | ||
|
||
</Context> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
JAVA_OPTS="-server -DPROXL_MYSQL_USER=${PROXL_MYSQL_USER} -DPROXL_MYSQL_PASSWORD=${PROXL_MYSQL_PASSWORD} -DPROXL_DATABASE_NAME=${PROXL_DATABASE_NAME} " | ||
|
||
CATALINA_OPTS="${WEBAPP_JAVA_OPTIONS}" |