-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ignore rules for sdkman and vim config files. * Add console logger config * Clean up Dockerfile, modify ENTRYPOINT to CMD directive. * Cleanup gitignore file * Cleanup text and formatting a bit * Modify docker image reference * Add back readme alerts * Fix alert typos * Update README.md * Remove log4j appender config during build * Move away from openjdk base image * Remove file appender logging instructions in-favor of stdout logging.
- Loading branch information
Showing
4 changed files
with
122 additions
and
68 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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
annotationPipeline/target/* | ||
# Core | ||
annotator/target/* | ||
annotationPipeline/target/* | ||
annotationPipeline/src/main/resources/application.properties | ||
annotationPipeline/src/main/resources/log4j.properties | ||
annotationPipeline/data/output.txt | ||
|
||
databaseAnnotator/target/* | ||
databaseAnnotator/src/main/resources/application.properties | ||
.DS_Store | ||
annotationPipeline/src/main/resources/log4j.properties | ||
databaseAnnotator/src/main/resources/log4j.properties | ||
*.iml | ||
|
||
# Utilities Ignore | ||
swagger-codegen-cli.jar | ||
*.iml | ||
*repository.sqlite | ||
annotationPipeline/data/output.txt | ||
|
||
# OS Ignore | ||
.DS_Store | ||
|
||
# Editor Ignore | ||
/.idea/ | ||
.vim/ | ||
.sdkmanrc |
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 |
---|---|---|
@@ -1,26 +1,39 @@ | ||
FROM openjdk:21-jdk-slim | ||
# Multi-stage build | ||
FROM maven:3-eclipse-temurin-21 as build | ||
|
||
# Build args | ||
ARG MAVEN_OPTS=-DskipTests | ||
|
||
# ENV variables | ||
ENV GN_HOME=/genome-nexus-annotation-pipeline | ||
ENV GN_RESOURCES=$GN_HOME/annotationPipeline/src/main/resources | ||
|
||
# Add source files | ||
COPY . $GN_HOME | ||
WORKDIR $GN_HOME | ||
|
||
COPY annotationPipeline/src/main/resources/log4j.properties.EXAMPLE $GN_HOME/annotationPipeline/src/main/resources/log4j.properties | ||
RUN apt-get update && apt-get install -y maven && apt-get clean; | ||
# set log4j file in properties | ||
RUN sed -i "s|log4j\.appender\.a\.File.*|log4j.appender.a.File = $GN_HOME/logs/genome-nexus-annotation-pipeline.log|" $GN_HOME/annotationPipeline/src/main/resources/log4j.properties | ||
|
||
ARG mvnprofiles='' | ||
RUN mvn -DskipTests clean install $mvnprofiles | ||
# Configure log4j file in properties | ||
RUN cp $GN_RESOURCES/log4j.properties.console.EXAMPLE $GN_RESOURCES/log4j.properties | ||
|
||
# Maven build | ||
RUN mvn ${MAVEN_OPTS} clean install -q | ||
|
||
FROM openjdk:21-jdk-slim | ||
# Stage-1 | ||
FROM eclipse-temurin:21 | ||
|
||
ENV GN_HOME=/genome-nexus-annotation-pipeline | ||
ENV GN_RESOURCES=$GN_HOME/annotationPipeline/src/main/resources | ||
ENV GN_TARGET=$GN_HOME/annotationPipeline/target | ||
|
||
COPY --from=0 $GN_HOME/annotationPipeline/target/annotationPipeline-*.jar $GN_HOME/annotationPipeline/target/annotationPipeline.jar | ||
# Update and install dependencies | ||
RUN apt-get update && apt-get -y install \ | ||
procps \ | ||
&& apt-get clean | ||
|
||
COPY annotationPipeline/src/main/resources/application.properties.EXAMPLE $GN_HOME/annotationPipeline/src/main/resources/application.properties | ||
# Copy artifact from build-stage | ||
COPY --from=build $GN_TARGET/annotationPipeline-*.jar $GN_TARGET/annotationPipeline.jar | ||
COPY --from=build $GN_RESOURCES/application.properties.EXAMPLE $GN_RESOURCES/application.properties | ||
|
||
RUN apt-get update && apt-get install procps -y | ||
WORKDIR $GN_HOME/annotationPipeline/target | ||
|
||
ENTRYPOINT ["java", "-jar", "/genome-nexus-annotation-pipeline/annotationPipeline/target/annotationPipeline.jar"] | ||
CMD ["java", "-jar", "annotationPipeline.jar"] |
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
29 changes: 29 additions & 0 deletions
29
annotationPipeline/src/main/resources/log4j.properties.console.EXAMPLE
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 @@ | ||
# Change INFO to DEBUG, if you want to see debugging info on underlying libraries we use. | ||
log4j.rootLogger=INFO, stdout | ||
|
||
# Change INFO to DEBUG, if you want see debugging info on our packages only. | ||
log4j.category.org.mskcc=INFO | ||
#log4j.category.org.springframework=ALL | ||
|
||
#log4j.logger.org.springframework.security=DEBUG | ||
#log4j.logger.org.springframework.integration=DEBUG | ||
|
||
|
||
# Use the JVM option, e.g.: "java -DPORTAL_HOME=/pathto/portal_homedir", | ||
# or - "java -DPORTAL_HOME=$PORTAL_HOME", where PORTAL_HOME is shell (environment) variable. | ||
|
||
## IMPORTANT - THRESHOLD SHOULD NOT BE DEBUG FOR PRODUCTION, CREDENTIALS CAN BE DISPLAYED! | ||
|
||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
log4j.appender.stdout.Target=System.out | ||
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout | ||
log4j.appender.stdout.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c - %m%n | ||
|
||
#log4j.logger.org.hibernate=INFO, a | ||
#log4j.logger.org.hibernate.SQL=DEBUG | ||
#log4j.logger.org.hibernate.type=TRACE | ||
#log4j.logger.org.hibernate.hql.ast.AST=info | ||
#log4j.logger.org.hibernate.tool.hbm2ddl=warn | ||
#log4j.logger.org.hibernate.hql=debug | ||
#log4j.logger.org.hibernate.cache=info | ||
#log4j.logger.org.hibernate.jdbc=debug |