-
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.
Merge pull request #108 from srdc/tofhir-log-server
Tofhir log server
- Loading branch information
Showing
44 changed files
with
2,565 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
version: '3.9' | ||
services: | ||
tofhir-log-server: | ||
image: srdc/tofhir-log-server:latest | ||
container_name: tofhir-log-server | ||
hostname: tofhir-log-server | ||
ports: | ||
- "8086:8086" | ||
networks: | ||
- tofhir-network | ||
volumes: | ||
- './tofhir-docker-logs:/usr/local/tofhir/logs' | ||
tofhir-server: | ||
image: srdc/tofhir-server:latest | ||
container_name: tofhir | ||
hostname: tofhir | ||
environment: | ||
- LOG_SERVICE_ENDPOINT=http://tofhir-log-server:8086/tofhir-logs | ||
- FHIR_DEFINITIONS_ENDPOINT=http://onfhir:8080/fhir | ||
- FHIR_REPO_URL=http://onfhir:8080/fhir | ||
- APP_CONF_FILE=/usr/local/tofhir/conf/docker/tofhir-server.conf | ||
- CONTEXT_PATH=conf | ||
ports: | ||
- "8085:8085" | ||
networks: | ||
- tofhir-network | ||
volumes: | ||
- './data-integration-suite:/usr/local/tofhir/conf' | ||
- './tofhir-docker-logs:/usr/local/tofhir/logs' | ||
tofhir-web: | ||
image: srdc/tofhir-web:latest | ||
container_name: tofhir-web | ||
ports: | ||
- "8082:80" | ||
networks: | ||
- tofhir-network | ||
networks: | ||
tofhir-network: | ||
name: onfhir-network | ||
external: true |
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,4 @@ | ||
# Execute one of the following commands from the project.root.directory (../../) | ||
|
||
docker build -f docker/engine/Dockerfile-addJar -t srdc/tofhir:latest -t srdc/tofhir:1.0 . | ||
docker build -f docker/engine/Dockerfile-buildJar -t srdc/tofhir:latest -t srdc/tofhir:1.0 . |
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,11 @@ | ||
FROM openjdk:11-jre-slim | ||
|
||
ENV TOFHIR_HOME /usr/local/tofhir | ||
RUN mkdir -p "$TOFHIR_HOME" | ||
WORKDIR $TOFHIR_HOME | ||
|
||
COPY ./tofhir-log-server/target/tofhir-log-server-standalone.jar . | ||
COPY ./docker/log-server/docker-entrypoint.sh . | ||
RUN chmod +x docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["./docker-entrypoint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Execute one of the following commands from the project.root.directory (../../) | ||
|
||
docker build -f docker/log-server/Dockerfile -t srdc/tofhir-log-server:latest . | ||
|
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
JAVA_CMD="java -Xms256m -Xmx3g -jar " | ||
|
||
# Configure application.conf path | ||
if [ ! -z "$APP_CONF_FILE" ]; then | ||
JAVA_CMD+="-Dconfig.file=$APP_CONF_FILE " | ||
fi | ||
|
||
# Configure logback configuration file | ||
if [ ! -z "$LOGBACK_CONF_FILE" ]; then | ||
JAVA_CMD+="-Dlogback.configurationFile=$LOGBACK_CONF_FILE " | ||
fi | ||
|
||
# Configure Spark | ||
if [ ! -z "$SPARK_APPNAME" ]; then | ||
JAVA_CMD+="-Dspark.app-name=$SPARK_APPNAME " | ||
fi | ||
if [ ! -z "$SPARK_MASTER" ]; then | ||
JAVA_CMD+="-Dspark.master=$SPARK_MASTER " | ||
fi | ||
|
||
# Configure tofhir-server web server | ||
if [ ! -z "$WEBSERVER_HOST" ]; then | ||
JAVA_CMD+="-Dwebserver.host=$WEBSERVER_HOST " | ||
fi | ||
if [ ! -z "$WEBSERVER_PORT" ]; then | ||
JAVA_CMD+="-Dwebserver.port=$WEBSERVER_PORT " | ||
fi | ||
if [ ! -z "$WEBSERVER_BASEURI" ]; then | ||
JAVA_CMD+="-Dwebserver.base-uri=$WEBSERVER_BASEURI " | ||
fi | ||
|
||
# Delay the execution for this amount of seconds | ||
if [ ! -z "$DELAY_EXECUTION" ]; then | ||
sleep $DELAY_EXECUTION | ||
fi | ||
|
||
# Finally, tell which jar to run | ||
JAVA_CMD+="tofhir-log-server-standalone.jar" | ||
|
||
eval $JAVA_CMD "$@" |
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,11 @@ | ||
FROM openjdk:11-jre-slim | ||
|
||
ENV TOFHIR_HOME /usr/local/tofhir | ||
RUN mkdir -p "$TOFHIR_HOME" | ||
WORKDIR $TOFHIR_HOME | ||
|
||
COPY ./tofhir-server/target/tofhir-server-standalone.jar . | ||
COPY ./docker/server/docker-entrypoint.sh . | ||
RUN chmod +x docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["./docker-entrypoint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Execute one of the following commands from the project.root.directory (../../) | ||
|
||
docker build -f docker/server/Dockerfile -t srdc/tofhir-server:latest . | ||
|
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,84 @@ | ||
#!/usr/bin/env bash | ||
|
||
JAVA_CMD="java -Xms256m -Xmx3g -jar " | ||
|
||
# Configure application.conf path | ||
if [ ! -z "$APP_CONF_FILE" ]; then | ||
JAVA_CMD+="-Dconfig.file=$APP_CONF_FILE " | ||
fi | ||
|
||
# Configure logback configuration file | ||
if [ ! -z "$LOGBACK_CONF_FILE" ]; then | ||
JAVA_CMD+="-Dlogback.configurationFile=$LOGBACK_CONF_FILE " | ||
fi | ||
|
||
# Configure Spark | ||
if [ ! -z "$SPARK_APPNAME" ]; then | ||
JAVA_CMD+="-Dspark.app-name=$SPARK_APPNAME " | ||
fi | ||
if [ ! -z "$SPARK_MASTER" ]; then | ||
JAVA_CMD+="-Dspark.master=$SPARK_MASTER " | ||
fi | ||
|
||
# Configure toFHIR mapping-related paths | ||
if [ ! -z "$CONTEXT_PATH" ]; then | ||
JAVA_CMD+="-Dtofhir.context-path=$CONTEXT_PATH " | ||
fi | ||
if [ ! -z "$MAPPINGS_FOLDER" ]; then | ||
JAVA_CMD+="-Dtofhir.mappings.repository.folder-path=$MAPPINGS_FOLDER " | ||
fi | ||
if [ ! -z "$SCHEMAS_FOLDER" ]; then | ||
JAVA_CMD+="-Dtofhir.mappings.schemas.repository.folder-path=$SCHEMAS_FOLDER " | ||
fi | ||
if [ ! -z "$MAPPING_JOB" ]; then | ||
JAVA_CMD+="-Dtofhir.mapping-jobs.initial-job-file-path=$MAPPING_JOB " | ||
fi | ||
if [ ! -z "$FHIR_BATCH_SIZE" ]; then | ||
JAVA_CMD+="-Dtofhir.fhir-writer.batch-group-size=$FHIR_BATCH_SIZE " | ||
fi | ||
if [ ! -z "$DB_PATH" ]; then | ||
JAVA_CMD+="-Dtofhir.db-path=$DB_PATH " | ||
fi | ||
|
||
# Configure the FHIR endpoint to which this toFHIR can connect to retrieve resource definitions etc. | ||
if [ ! -z "$FHIR_DEFINITIONS_ENDPOINT" ]; then | ||
JAVA_CMD+="-Dfhir.definitions-fhir-endpoint=$FHIR_DEFINITIONS_ENDPOINT " | ||
fi | ||
if [ ! -z "$FHIR_DEFINITIONS_ROOT_URL" ]; then | ||
JAVA_CMD+="-Dfhir.definitions-root-urls=$FHIR_DEFINITIONS_ROOT_URL " | ||
fi | ||
if [ ! -z "$FHIR_DEFINITIONS_PROFILES_PATH" ]; then | ||
JAVA_CMD+="-Dfhir.profiles-path=$FHIR_DEFINITIONS_ROOT_URL " | ||
fi | ||
if [ ! -z "$FHIR_DEFINITIONS_VALUESETS_PATH" ]; then | ||
JAVA_CMD+="-Dfhir.valuesets-path=$FHIR_DEFINITIONS_VALUESETS_PATH " | ||
fi | ||
if [ ! -z "$FHIR_DEFINITIONS_CODESYSTEMS_URL" ]; then | ||
JAVA_CMD+="-Dfhir.codesystems-path=$FHIR_DEFINITIONS_CODESYSTEMS_URL " | ||
fi | ||
|
||
# Configure tofhir-server web server | ||
if [ ! -z "$WEBSERVER_HOST" ]; then | ||
JAVA_CMD+="-Dwebserver.host=$WEBSERVER_HOST " | ||
fi | ||
if [ ! -z "$WEBSERVER_PORT" ]; then | ||
JAVA_CMD+="-Dwebserver.port=$WEBSERVER_PORT " | ||
fi | ||
if [ ! -z "$WEBSERVER_BASEURI" ]; then | ||
JAVA_CMD+="-Dwebserver.base-uri=$WEBSERVER_BASEURI " | ||
fi | ||
|
||
# Configure log service | ||
if [ ! -z "$LOG_SERVICE_ENDPOINT" ]; then | ||
JAVA_CMD+="-Dlog-service.endpoint=$LOG_SERVICE_ENDPOINT " | ||
fi | ||
|
||
# Delay the execution for this amount of seconds | ||
if [ ! -z "$DELAY_EXECUTION" ]; then | ||
sleep $DELAY_EXECUTION | ||
fi | ||
|
||
# Finally, tell which jar to run | ||
JAVA_CMD+="tofhir-server-standalone.jar" | ||
|
||
eval $JAVA_CMD "$@" |
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
Oops, something went wrong.