forked from cBioPortal/cbioportal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cBioPortal#546 Allow deployment on Heroku
- Add webapp-runner.jar as dependency (used by heroku to run war) - Add deploy to heroku button to README - Remove unnecessary target directories after building war to decrease heroku's slug size (basically size repo + war) - Add dbconnector spring property to allow using jndi or dbcp at runtime. Heroku's webapp-runner.jar does not seem to work with our setup of jndi. - There is a heroku profile in pom.xml that copies all heroku specific files to the root dir of the portal when building the war. Only app.json has to be in the root dir for the deploy to heroku button to work. Copy EXAMPLE property file to src/main/resources/portal.properties. Set custom properties on command line with maven in app.json (i.e. use amazon public db). - There was a problem with PORTAL_HOME both being required at run time and build time. At Heroku the build directory is different from the run directory and currently there is no dynamic way to get the name of this dir. Scripts in profile.d are run on heroku before the war is started. This allows one to set the PORTAL_HOME variable there. The PORTAL_HOME variable at build time is set through a buildpack on github inodb/cbioportal-buildpack. This is why the extra buildpack is required.
- Loading branch information
Showing
9 changed files
with
162 additions
and
8 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
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,31 @@ | ||
{ | ||
"name": "cBioPortal", | ||
"description":"The cBioPortal for Cancer Genomics provides visualization, analysis and download of large-scale cancer genomics data sets.", | ||
"repository":"https://github.com/cbioportal/cbioportal", | ||
"logo":"http://www.cbioportal.org/images/cbioportal_logo.png", | ||
"keywords": [ | ||
"java", | ||
"tomcat", | ||
"javascript", | ||
"cancer", | ||
"genomics" | ||
], | ||
"env": { | ||
"JAVA_OPTS": { | ||
"description":"options for jvm", | ||
"value": "-Xmx300m -Xms300m -XX:+UseCompressedOops" | ||
}, | ||
"MAVEN_CUSTOM_OPTS": { | ||
"description":"set heroku profile for mvn", | ||
"value":"-Pheroku,public -DskipTests -Ddb.user=cbio_user -Ddb.password=cbio_pass -Ddb.portal_db_name=public_test -Ddb.connection_string=jdbc:mysql://cbioportal-public.c1xhhbwn8izk.us-east-1.rds.amazonaws.com:3306/ -Ddb.host=cbioportal-public.c1xhhbwn8izk.us-east-1.rds.amazonaws.com" | ||
} | ||
}, | ||
"buildpacks": [ | ||
{ | ||
"url": "https://github.com/inodb/cbioportal-buildpack" | ||
}, | ||
{ | ||
"url": "https://github.com/heroku/heroku-buildpack-java" | ||
} | ||
] | ||
} |
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
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 @@ | ||
export PORTAL_HOME=/app |
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 @@ | ||
web: java $JAVA_OPTS -Ddbconnector=dbcp -jar portal/target/dependency/webapp-runner.jar --expand-war --port $PORT portal/target/cbioportal.war |
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
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
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
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