Mercurial > hg > digilib
diff build/docker/entrypoint.sh @ 1705:439aefc7a6c9
README for Docker hub and configuration options for container.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 18 Feb 2019 18:32:15 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/docker/entrypoint.sh Mon Feb 18 18:32:15 2019 +0100 @@ -0,0 +1,35 @@ +#!/bin/sh + +DL_CONFIG=webapps/digilib/WEB-INF/digilib-config.xml + +if [ ! -f $DL_CONFIG ] ; then +# generate digilib config using ENV +cat <<EOF > $DL_CONFIG +<?xml version="1.0" encoding="UTF-8"?> +<digilib-config> + <!-- A list of directories where images are searched --> + <parameter name="basedir-list" value="${BASEDIR_LIST:-/usr/local/tomcat/webapps/digilib/sample-images}" /> + + <!-- The default interpolation quality (0-2). --> + <parameter name="default-quality" value="${DEFAULT_QUALITY:-2}" /> + + <!-- The maximum size of delivered images as pixel area, 40000 means up to 200x200 or 100x400, 0 means no limit. --> + <parameter name="max-image-size" value="${MAX_IMAGE_SIZE:-0}" /> + + <!-- is sending whole image files with mo=file allowed? --> + <parameter name="sendfile-allowed" value="${SENDFILE_ALLOWED:-true}" /> + + <!-- number of working threads --> + <parameter name="worker-threads" value="${WORKER_THREADS:-2}" /> + + <!-- number of waiting requests in queue --> + <parameter name="max-waiting-threads" value="${MAX_WAITING_THREADS:-20}" /> + + <!-- The prefix (after Scaler) that leads to the IIIF API.--> + <parameter name="iiif-prefix" value="${IIIF_PREFIX:-IIIF}" /> +</digilib-config> +EOF +fi + +# run the command given in the origin Dockerfile at CMD +exec catalina.sh run