-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,401 additions
and
848 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,26 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
README.md | ||
|
||
# .git is not ignored, as it is needed during maven run |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM maven:3.6-jdk-11 AS BUILD | ||
# build indexer jar | ||
|
||
COPY ./ /indexer | ||
WORKDIR /indexer | ||
RUN mvn -f goobi-viewer-indexer clean package | ||
|
||
|
||
# start assembling the final image | ||
FROM openjdk:11-jdk AS ASSEMBLE | ||
LABEL org.opencontainers.image.authors="Matthias Geerdsen <matthias.geerdsen@intranda.com>" | ||
|
||
|
||
ENV SOLR_URL http://solr:8983/solr/collection1 | ||
ENV VIEWER_URL http://viewer:8080/viewer | ||
|
||
RUN mkdir -p /opt/digiverso/indexer | ||
|
||
COPY --from=BUILD /indexer/goobi-viewer-indexer/target/solr-Indexer.jar /usr/local/bin/solrIndexer.jar | ||
COPY --from=BUILD /indexer/goobi-viewer-indexer/src/main/resources/indexerconfig_solr.xml /opt/digiverso/indexer/solr_indexerconfig.xml | ||
COPY ./docker/* / | ||
RUN sed -e "s|<solrUrl>.*</solrUrl>|<solrUrl>${SOLR_URL}</solrUrl>|" -e 's|C:|/opt|g' -e "s|<viewerUrl>.*</viewerUrl>|<viewerUrl>${VIEWER_URL}</viewerUrl>|" -i /opt/digiverso/indexer/solr_indexerconfig.xml | ||
|
||
# TODO: check for solr availability before start (wait-for-solr from solr image?) | ||
|
||
CMD ["/run.sh"] |
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,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration> | ||
|
||
<Appenders> | ||
<Console name="stdout"> | ||
<PatternLayout pattern="%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] (%F\:%M\:%L)%n %msg%n" /> | ||
</Console> | ||
</Appenders> | ||
|
||
<Loggers> | ||
<Logger name="io.goobi" level="INFO" additivity="true" /> | ||
<Logger name="de.intranda.digiverso.ocr" level="WARN" additivity="false" /> | ||
<Logger name="de.intranda.digiverso.normdataimporter" level="DEBUG" additivity="false" /> | ||
<Logger name="org.apache" level="ERROR" additivity="true" /> | ||
<Root level="info"> | ||
<AppenderRef ref="stdout" /> | ||
</Root> | ||
</Loggers> | ||
|
||
</Configuration> |
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 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
[ -z "$CONFIGSOURCE" ] && CONFIGSOURCE="default" | ||
|
||
set -u | ||
|
||
#if [ -n "${WORKING_STORAGE:-}" ] | ||
#then | ||
#CATALINA_TMPDIR="${WORKING_STORAGE}/goobi/jvmtemp" | ||
#mkdir -p "${CATALINA_TMPDIR}" | ||
#echo >> /usr/local/tomcat/bin/setenv.sh | ||
#echo "CATALINA_TMPDIR=${CATALINA_TMPDIR}" >> /usr/local/tomcat/bin/setenv.sh | ||
#fi | ||
|
||
case $CONFIGSOURCE in | ||
# s3) | ||
# if [ -z "$AWS_S3_BUCKET" ] | ||
# then | ||
# echo "AWS_S3_BUCKET is required" | ||
# exit 1 | ||
# fi | ||
# echo "Pulling configuration from s3 bucket" | ||
# aws s3 cp s3://$AWS_S3_BUCKET/viewer/config/ /opt/digiverso/viewer/config/ --recursive | ||
# ;; | ||
folder) | ||
if [ -z "$CONFIG_FOLDER" ] | ||
then | ||
echo "CONFIG_FOLDER is required" | ||
exit 1 | ||
fi | ||
|
||
if ! [ -d "$CONFIG_FOLDER" ] | ||
then | ||
echo "CONFIG_FOLDER: $CONFIG_FOLDER does not exists or is not a folder" | ||
exit 1 | ||
fi | ||
|
||
echo "Copying configuration from local folder" | ||
[ -d "$CONFIG_FOLDER" ] && cp -arv "$CONFIG_FOLDER"/* /opt/digiverso/indexer/ | ||
;; | ||
|
||
*) | ||
echo "Keeping configuration" | ||
# set solrUrl and viewerUrl from environment variables (defaults are given in Dockerfile) | ||
[ -w /opt/digiverso/indexer/solr_indexerconfig.xml ] && sed -e "s|<solrUrl>.*</solrUrl>|<solrUrl>${SOLR_URL}</solrUrl>|" -e "s|<viewerUrl>.*</viewerUrl>|<viewerUrl>${VIEWER_URL}</viewerUrl>|" -i /opt/digiverso/indexer/solr_indexerconfig.xml || echo "Did not modify indexer configuration from environment." | ||
|
||
;; | ||
esac | ||
|
||
|
||
echo "Starting application" | ||
exec java -Dlog4j.configurationFile=/log4j2.xml -jar /usr/local/bin/solrIndexer.jar /opt/digiverso/indexer/solr_indexerconfig.xml |
Oops, something went wrong.