From 033bd2c004c66ab0f7d4bf2c3cfc3e3bfed4063b Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Wed, 13 Jun 2018 12:07:02 -0300 Subject: [PATCH] Update to v4.0 (#1) --- Dockerfile | 359 ++++++++++++++++++++++-------------------- cantaloupe.properties | 249 +++++++++++++++++------------ setup.sh | 7 +- 3 files changed, 334 insertions(+), 281 deletions(-) diff --git a/Dockerfile b/Dockerfile index c5f2fb6..3259fd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,183 +4,194 @@ ENV CANTALOUPE_UID=999 \ CANTALOUPE_GID=999 \ JAVA_OPTS=-Xmx500m \ PROPERTIES_FILE=/cantaloupe/cantaloupe.properties \ - HTTP_HTTP2_ENABLED=false \ - HTTP_ACCEPT_QUEUE_LIMIT=0 \ - BASE_URI= \ - SLASH_SUBSTITUTE= \ - MAX_PIXELS=400000000 \ - PRINT_STACK_TRACE_ON_ERROR_PAGES=true \ - DELEGATE_SCRIPT_ENABLED=false \ - DELEGATE_SCRIPT_PATHNAME=delegates-3.4.rb \ - DELEGATE_SCRIPT_CACHE_ENABLED=false \ - ENDPOINT_PUBLIC_AUTH_BASIC_ENABLED=false \ - ENDPOINT_PUBLIC_AUTH_BASIC_USERNAME=myself \ - ENDPOINT_PUBLIC_AUTH_BASIC_SECRET=mypassword \ - ENDPOINT_IIIF_1_ENABLED=true \ - ENDPOINT_IIIF_2_ENABLED=true \ - ENDPOINT_IIIF_CONTENT_DISPOSITION=none \ - ENDPOINT_IIIF_MIN_SIZE=64 \ - ENDPOINT_IIIF_MIN_TILE_SIZE=1024 \ - ENDPOINT_IIIF_2_RESTRICT_TO_SIZES=false \ - ENDPOINT_ADMIN_ENABLED=false \ - ENDPOINT_ADMIN_USERNAME=admin \ - ENDPOINT_ADMIN_SECRET= \ - ENDPOINT_API_ENABLED=false \ - ENDPOINT_API_USERNAME= \ - ENDPOINT_API_SECRET= \ - RESOLVER_STATIC=FilesystemResolver \ - RESOLVER_DELEGATE=false \ - FILESYSTEMRESOLVER_LOOKUP_STRATEGY=BasicLookupStrategy \ - FILESYSTEMRESOLVER_BASICLOOKUPSTRATEGY_PATH_PREFIX=/cantaloupe/images \ - FILESYSTEMRESOLVER_BASICLOOKUPSTRATEGY_PATH_SUFFIX= \ - HTTPRESOLVER_TRUST_ALL_CERTS=false \ - HTTPRESOLVER_REQUEST_TIMEOUT=10 \ - HTTPRESOLVER_LOOKUP_STRATEGY=BasicLookupStrategy \ - HTTPRESOLVER_BASICLOOKUPSTRATEGY_URL_PREFIX=http://localhost/images/ \ - HTTPRESOLVER_BASICLOOKUPSTRATEGY_URL_SUFFIX= \ - HTTPRESOLVER_AUTH_BASIC_USERNAME= \ - HTTPRESOLVER_AUTH_BASIC_SECRET= \ - JDBCRESOLVER_URL=jdbc:postgresql://localhost:5432/my_database \ - JDBCRESOLVER_USER=postgres \ - JDBCRESOLVER_PASSWORD=postgres \ - JDBCRESOLVER_CONNECTION_TIMEOUT=10 \ - AMAZONS3RESOLVER_ACCESS_KEY_ID= \ - AMAZONS3RESOLVER_SECRET_KEY= \ - AMAZONS3RESOLVER_BUCKET_NAME= \ - AMAZONS3RESOLVER_BUCKET_REGION= \ - AMAZONS3RESOLVER_LOOKUP_STRATEGY=BasicLookupStrategy \ - AMAZONS3RESOLVER_MAX_CONNECTIONS= \ - AZURESTORAGERESOLVER_ACCOUNT_NAME= \ - AZURESTORAGERESOLVER_ACCOUNT_KEY= \ - AZURESTORAGERESOLVER_CONTAINER_NAME= \ - AZURESTORAGERESOLVER_LOOKUP_STRATEGY=BasicLookupStrategy \ - PROCESSOR_AVI=FfmpegProcessor \ - PROCESSOR_BMP= \ - PROCESSOR_DCM=ImageMagickProcessor \ - PROCESSOR_FLV=FfmpegProcessor \ - PROCESSOR_GIF= \ - PROCESSOR_JP2=KakaduProcessor \ - PROCESSOR_JPG= \ - PROCESSOR_MOV=FfmpegProcessor \ - PROCESSOR_MP4=FfmpegProcessor \ - PROCESSOR_MPG=FfmpegProcessor \ - PROCESSOR_PDF=PdfBoxProcessor \ - PROCESSOR_PNG= \ - PROCESSOR_TIF= \ - PROCESSOR_WEBM=FfmpegProcessor \ - PROCESSOR_WEBP=ImageMagickProcessor \ - PROCESSOR_FALLBACK=Java2dProcessor \ - PROCESSOR_DPI=150 \ - PROCESSOR_NORMALIZE=false \ - PROCESSOR_BACKGROUND_COLOR=black \ - PROCESSOR_DOWNSCALE_FILTER=bicubic \ - PROCESSOR_UPSCALE_FILTER=bicubic \ - PROCESSOR_SHARPEN=0 \ - PROCESSOR_METADATA_PRESERVE=false \ - PROCESSOR_METADATA_RESPECT_ORIENTATION=false \ - PROCESSOR_LIMIT_TO_8_BITS=true \ - PROCESSOR_JPG_PROGRESSIVE=true \ - PROCESSOR_JPG_QUALITY=80 \ - PROCESSOR_TIF_COMPRESSION=LZW \ - STREAMPROCESSOR_RETRIEVAL_STRATEGY=StreamStrategy \ - CACHE_CLIENT_ENABLED=true \ - CACHE_CLIENT_MAX_AGE=2592000 \ - CACHE_CLIENT_SHARED_MAX_AGE= \ - CACHE_CLIENT_PUBLIC=true \ - CACHE_CLIENT_PRIVATE=false \ - CACHE_CLIENT_NO_CACHE=false \ - CACHE_CLIENT_NO_STORE=false \ - CACHE_CLIENT_MUST_REVALIDATE=false \ - CACHE_CLIENT_PROXY_REVALIDATE=false \ - CACHE_CLIENT_NO_TRANSFORM=true \ - CACHE_SERVER_SOURCE_ENABLED=false \ - CACHE_SERVER_SOURCE=FilesystemCache \ - CACHE_SERVER_DERIVATIVE_ENABLED=false \ - CACHE_SERVER_DERIVATIVE= \ - CACHE_SERVER_INFO_ENABLED=true \ - CACHE_SERVER_TTL_SECONDS=2592000 \ - CACHE_SERVER_PURGE_MISSING=false \ - CACHE_SERVER_RESOLVE_FIRST=false \ - CACHE_SERVER_WORKER_ENABLED=false \ - CACHE_SERVER_WORKER_INTERVAL=86400 \ - FILESYSTEMCACHE_PATHNAME=/cantaloupe/cache \ - FILESYSTEMCACHE_DIR_DEPTH=3 \ - FILESYSTEMCACHE_DIR_NAME_LENGTH=2 \ - HEAPCACHE_TARGET_SIZE=2G \ - HEAPCACHE_PERSIST=false \ - HEAPCACHE_PERSIST_FILESYSTEM_PATHNAME=/var/cache/cantaloupe/heap.cache \ - JDBCCACHE_URL=jdbc:postgresql://localhost:5432/cantaloupe \ - JDBCCACHE_USER=postgres \ - JDBCCACHE_PASSWORD= \ - JDBCCACHE_CONNECTION_TIMEOUT=10 \ - JDBCCACHE_DERIVATIVE_IMAGE_TABLE=derivative_cache \ - JDBCCACHE_INFO_TABLE=info_cache \ - AMAZONS3CACHE_ACCESS_KEY_ID= \ - AMAZONS3CACHE_SECRET_KEY= \ - AMAZONS3CACHE_BUCKET_NAME= \ - AMAZONS3CACHE_BUCKET_REGION= \ - AMAZONS3CACHE_OBJECT_KEY_PREFIX= \ - AMAZONS3CACHE_MAX_CONNECTIONS= \ - AZURESTORAGECACHE_ACCOUNT_NAME= \ - AZURESTORAGECACHE_ACCOUNT_KEY= \ - AZURESTORAGECACHE_CONTAINER_NAME= \ - AZURESTORAGECACHE_OBJECT_KEY_PREFIX= \ - REDISCACHE_HOST=localhost \ - REDISCACHE_PORT=6379 \ - REDISCACHE_SSL=false \ - REDISCACHE_PASSWORD= \ - REDISCACHE_DATABASE=0 \ - OVERLAYS_ENABLED=false \ - OVERLAYS_STRATEGY=BasicStrategy \ - OVERLAYS_BASICSTRATEGY_TYPE=image \ - OVERLAYS_BASICSTRATEGY_IMAGE=/path/to/overlay.png \ + HTTP_HTTP2_ENABLED="false" \ + HTTP_ACCEPT_QUEUE_LIMIT="" \ + BASE_URI="" \ + SLASH_SUBSTITUTE="" \ + MAX_PIXELS="400000000" \ + PRINT_STACK_TRACE_ON_ERROR_PAGES="true" \ + DELEGATE_SCRIPT_ENABLED="false" \ + DELEGATE_SCRIPT_PATHNAME="delegates.rb" \ + DELEGATE_SCRIPT_CACHE_ENABLED="false" \ + ENDPOINT_PUBLIC_AUTH_BASIC_ENABLED="false" \ + ENDPOINT_PUBLIC_AUTH_BASIC_USERNAME="myself" \ + ENDPOINT_PUBLIC_AUTH_BASIC_SECRET="mypassword" \ + ENDPOINT_IIIF_1_ENABLED="false" \ + ENDPOINT_IIIF_2_ENABLED="true" \ + ENDPOINT_IIIF_CONTENT_DISPOSITION="inline" \ + ENDPOINT_IIIF_MIN_SIZE="64" \ + ENDPOINT_IIIF_MIN_TILE_SIZE="512" \ + ENDPOINT_IIIF_2_RESTRICT_TO_SIZES="false" \ + ENDPOINT_ADMIN_ENABLED="false" \ + ENDPOINT_ADMIN_USERNAME="admin" \ + ENDPOINT_ADMIN_SECRET="" \ + ENDPOINT_API_ENABLED="false" \ + ENDPOINT_API_USERNAME="" \ + ENDPOINT_API_SECRET="" \ + SOURCE_STATIC="FilesystemSource" \ + SOURCE_DELEGATE="false" \ + FILESYSTEMSOURCE_LOOKUP_STRATEGY="BasicLookupStrategy" \ + FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX="/home/myself/images/" \ + FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX="" \ + HTTPSOURCE_TRUST_ALL_CERTS="false" \ + HTTPSOURCE_REQUEST_TIMEOUT="" \ + HTTPSOURCE_LOOKUP_STRATEGY="BasicLookupStrategy" \ + HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_PREFIX="http://localhost/images/" \ + HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_SUFFIX="" \ + HTTPSOURCE_BASICLOOKUPSTRATEGY_AUTH_BASIC_USERNAME="" \ + HTTPSOURCE_BASICLOOKUPSTRATEGY_AUTH_BASIC_SECRET="" \ + JDBCSOURCE_URL="jdbc:postgresql://localhost:5432/my_database" \ + JDBCSOURCE_USER="postgres" \ + JDBCSOURCE_PASSWORD="postgres" \ + JDBCSOURCE_CONNECTION_TIMEOUT="10" \ + S3SOURCE_ENDPOINT="" \ + S3SOURCE_ACCESS_KEY_ID="" \ + S3SOURCE_SECRET_KEY="" \ + S3SOURCE_MAX_CONNECTIONS="" \ + S3SOURCE_LOOKUP_STRATEGY="BasicLookupStrategy" \ + S3SOURCE_BASICLOOKUPSTRATEGY_BUCKET_NAME="" \ + S3SOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX="" \ + S3SOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX="" \ + AZURESTORAGESOURCE_ACCOUNT_NAME="" \ + AZURESTORAGESOURCE_ACCOUNT_KEY="" \ + AZURESTORAGESOURCE_CONTAINER_NAME="" \ + AZURESTORAGESOURCE_LOOKUP_STRATEGY="BasicLookupStrategy" \ + PROCESSOR_AVI="FfmpegProcessor" \ + PROCESSOR_BMP="" \ + PROCESSOR_DCM="ImageMagickProcessor" \ + PROCESSOR_FLV="FfmpegProcessor" \ + PROCESSOR_GIF="" \ + PROCESSOR_JP2="KakaduNativeProcessor" \ + PROCESSOR_JPG="" \ + PROCESSOR_MOV="FfmpegProcessor" \ + PROCESSOR_MP4="FfmpegProcessor" \ + PROCESSOR_MPG="FfmpegProcessor" \ + PROCESSOR_PDF="PdfBoxProcessor" \ + PROCESSOR_PNG="" \ + PROCESSOR_TIF="" \ + PROCESSOR_WEBM="FfmpegProcessor" \ + PROCESSOR_WEBP="ImageMagickProcessor" \ + PROCESSOR_FALLBACK="Java2dProcessor" \ + PROCESSOR_STREAM_RETRIEVAL_STRATEGY="StreamStrategy" \ + PROCESSOR_FALLBACK_RETRIEVAL_STRATEGY="DownloadStrategy" \ + PROCESSOR_DPI="150" \ + PROCESSOR_NORMALIZE="false" \ + PROCESSOR_BACKGROUND_COLOR="white" \ + PROCESSOR_DOWNSCALE_FILTER="bicubic" \ + PROCESSOR_UPSCALE_FILTER="bicubic" \ + PROCESSOR_SHARPEN="0" \ + PROCESSOR_METADATA_PRESERVE="false" \ + PROCESSOR_METADATA_RESPECT_ORIENTATION="false" \ + PROCESSOR_JPG_PROGRESSIVE="true" \ + PROCESSOR_JPG_QUALITY="80" \ + PROCESSOR_TIF_COMPRESSION="LZW" \ + PROCESSOR_IMAGEIO_BMP_READER="" \ + PROCESSOR_IMAGEIO_GIF_READER="" \ + PROCESSOR_IMAGEIO_GIF_WRITER="" \ + PROCESSOR_IMAGEIO_JPG_READER="" \ + PROCESSOR_IMAGEIO_JPG_WRITER="" \ + PROCESSOR_IMAGEIO_PNG_READER="" \ + PROCESSOR_IMAGEIO_PNG_WRITER="" \ + PROCESSOR_IMAGEIO_TIF_READER="" \ + PROCESSOR_IMAGEIO_TIF_WRITER="" \ + CACHE_CLIENT_ENABLED="true" \ + CACHE_CLIENT_MAX_AGE="2592000" \ + CACHE_CLIENT_SHARED_MAX_AGE="" \ + CACHE_CLIENT_PUBLIC="true" \ + CACHE_CLIENT_PRIVATE="false" \ + CACHE_CLIENT_NO_CACHE="false" \ + CACHE_CLIENT_NO_STORE="false" \ + CACHE_CLIENT_MUST_REVALIDATE="false" \ + CACHE_CLIENT_PROXY_REVALIDATE="false" \ + CACHE_CLIENT_NO_TRANSFORM="true" \ + CACHE_SERVER_SOURCE="FilesystemCache" \ + CACHE_SERVER_SOURCE_TTL_SECONDS="2592000" \ + CACHE_SERVER_DERIVATIVE_ENABLED="false" \ + CACHE_SERVER_DERIVATIVE="" \ + CACHE_SERVER_DERIVATIVE_TTL_SECONDS="2592000" \ + CACHE_SERVER_INFO_ENABLED="true" \ + CACHE_SERVER_PURGE_MISSING="false" \ + CACHE_SERVER_RESOLVE_FIRST="false" \ + CACHE_SERVER_WORKER_ENABLED="false" \ + CACHE_SERVER_WORKER_INTERVAL="86400" \ + FILESYSTEMCACHE_PATHNAME="/var/cache/cantaloupe" \ + FILESYSTEMCACHE_DIR_DEPTH="3" \ + FILESYSTEMCACHE_DIR_NAME_LENGTH="2" \ + HEAPCACHE_TARGET_SIZE="2G" \ + HEAPCACHE_PERSIST="false" \ + HEAPCACHE_PERSIST_FILESYSTEM_PATHNAME="/var/cache/cantaloupe/heap.cache" \ + JDBCCACHE_URL="jdbc:postgresql://localhost:5432/cantaloupe" \ + JDBCCACHE_USER="postgres" \ + JDBCCACHE_PASSWORD="" \ + JDBCCACHE_CONNECTION_TIMEOUT="10" \ + JDBCCACHE_DERIVATIVE_IMAGE_TABLE="derivative_cache" \ + JDBCCACHE_INFO_TABLE="info_cache" \ + S3CACHE_ENDPOINT="" \ + S3CACHE_ACCESS_KEY_ID="" \ + S3CACHE_SECRET_KEY="" \ + S3CACHE_BUCKET_NAME="" \ + S3CACHE_OBJECT_KEY_PREFIX="" \ + S3CACHE_MAX_CONNECTIONS="" \ + AZURESTORAGECACHE_ACCOUNT_NAME="" \ + AZURESTORAGECACHE_ACCOUNT_KEY="" \ + AZURESTORAGECACHE_CONTAINER_NAME="" \ + AZURESTORAGECACHE_OBJECT_KEY_PREFIX="" \ + REDISCACHE_HOST="localhost" \ + REDISCACHE_PORT="6379" \ + REDISCACHE_SSL="false" \ + REDISCACHE_PASSWORD="" \ + REDISCACHE_DATABASE="0" \ + OVERLAYS_ENABLED="false" \ + OVERLAYS_STRATEGY="BasicStrategy" \ + OVERLAYS_BASICSTRATEGY_TYPE="image" \ + OVERLAYS_BASICSTRATEGY_IMAGE="/path/to/overlay.png" \ OVERLAYS_BASICSTRATEGY_STRING="Copyright \u00A9️ My Great Organization\nAll rights reserved." \ - OVERLAYS_BASICSTRATEGY_STRING_FONT=Helvetica \ - OVERLAYS_BASICSTRATEGY_STRING_FONT_SIZE=24 \ - OVERLAYS_BASICSTRATEGY_STRING_FONT_MIN_SIZE=18 \ - OVERLAYS_BASICSTRATEGY_STRING_FONT_WEIGHT=1.0 \ - OVERLAYS_BASICSTRATEGY_STRING_GLYPH_SPACING=0.02 \ - OVERLAYS_BASICSTRATEGY_STRING_COLOR=white \ - OVERLAYS_BASICSTRATEGY_STRING_STROKE_COLOR=black \ - OVERLAYS_BASICSTRATEGY_STRING_STROKE_WIDTH=1 \ + OVERLAYS_BASICSTRATEGY_STRING_FONT="Helvetica" \ + OVERLAYS_BASICSTRATEGY_STRING_FONT_SIZE="24" \ + OVERLAYS_BASICSTRATEGY_STRING_FONT_MIN_SIZE="18" \ + OVERLAYS_BASICSTRATEGY_STRING_FONT_WEIGHT="1.0" \ + OVERLAYS_BASICSTRATEGY_STRING_GLYPH_SPACING="0.02" \ + OVERLAYS_BASICSTRATEGY_STRING_COLOR="white" \ + OVERLAYS_BASICSTRATEGY_STRING_STROKE_COLOR="black" \ + OVERLAYS_BASICSTRATEGY_STRING_STROKE_WIDTH="1" \ OVERLAYS_BASICSTRATEGY_STRING_BACKGROUND_COLOR="rgba(0, 0, 0, 100)" \ OVERLAYS_BASICSTRATEGY_POSITION="bottom right" \ - OVERLAYS_BASICSTRATEGY_INSET=10 \ - OVERLAYS_BASICSTRATEGY_OUTPUT_WIDTH_THRESHOLD=400 \ - OVERLAYS_BASICSTRATEGY_OUTPUT_HEIGHT_THRESHOLD=300 \ - REDACTION_ENABLED=false \ - LOG_APPLICATION_LEVEL=debug \ - LOG_APPLICATION_CONSOLEAPPENDER_ENABLED=true \ - LOG_APPLICATION_FILEAPPENDER_ENABLED=false \ - LOG_APPLICATION_FILEAPPENDER_PATHNAME=/cantaloupe/logs/application.log \ - LOG_APPLICATION_ROLLINGFILEAPPENDER_ENABLED=false \ - LOG_APPLICATION_ROLLINGFILEAPPENDER_PATHNAME=/cantaloupe/logs/application.log \ - LOG_APPLICATION_ROLLINGFILEAPPENDER_POLICY=TimeBasedRollingPolicy \ - LOG_APPLICATION_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN=/path/to/logs/application-%d{yyyy-MM-dd}.log \ - LOG_APPLICATION_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY=30 \ - LOG_APPLICATION_SYSLOGAPPENDER_ENABLED=false \ - LOG_APPLICATION_SYSLOGAPPENDER_HOST= \ - LOG_APPLICATION_SYSLOGAPPENDER_PORT=514 \ - LOG_APPLICATION_SYSLOGAPPENDER_FACILITY=LOCAL0 \ - LOG_ERROR_FILEAPPENDER_ENABLED=false \ - LOG_ERROR_FILEAPPENDER_PATHNAME=/cantaloupe/logs/error.log \ - LOG_ERROR_ROLLINGFILEAPPENDER_ENABLED=false \ - LOG_ERROR_ROLLINGFILEAPPENDER_PATHNAME=/cantaloupe/logs/error.log \ - LOG_ERROR_ROLLINGFILEAPPENDER_POLICY=TimeBasedRollingPolicy \ - LOG_ERROR_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN=/path/to/logs/error-%d{yyyy-MM-dd}.log \ - LOG_ERROR_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY=30 \ - LOG_ACCESS_CONSOLEAPPENDER_ENABLED=false \ - LOG_ACCESS_FILEAPPENDER_ENABLED=false \ - LOG_ACCESS_FILEAPPENDER_PATHNAME=/cantaloupe/logs/access.log \ - LOG_ACCESS_ROLLINGFILEAPPENDER_ENABLED=false \ - LOG_ACCESS_ROLLINGFILEAPPENDER_PATHNAME=/cantaloupe/logs/access.log \ - LOG_ACCESS_ROLLINGFILEAPPENDER_POLICY=TimeBasedRollingPolicy \ - LOG_ACCESS_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN=/path/to/logs/access-%d{yyyy-MM-dd}.log \ - LOG_ACCESS_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY=30 \ - LOG_ACCESS_SYSLOGAPPENDER_ENABLED=false \ - LOG_ACCESS_SYSLOGAPPENDER_HOST= \ - LOG_ACCESS_SYSLOGAPPENDER_PORT=514 \ - LOG_ACCESS_SYSLOGAPPENDER_FACILITY=LOCAL0 + OVERLAYS_BASICSTRATEGY_INSET="10" \ + OVERLAYS_BASICSTRATEGY_OUTPUT_WIDTH_THRESHOLD="400" \ + OVERLAYS_BASICSTRATEGY_OUTPUT_HEIGHT_THRESHOLD="300" \ + REDACTION_ENABLED="false" \ + LOG_APPLICATION_LEVEL="debug" \ + LOG_APPLICATION_CONSOLEAPPENDER_ENABLED="true" \ + LOG_APPLICATION_FILEAPPENDER_ENABLED="false" \ + LOG_APPLICATION_FILEAPPENDER_PATHNAME="/path/to/logs/application.log" \ + LOG_APPLICATION_ROLLINGFILEAPPENDER_ENABLED="false" \ + LOG_APPLICATION_ROLLINGFILEAPPENDER_PATHNAME="/path/to/logs/application.log" \ + LOG_APPLICATION_ROLLINGFILEAPPENDER_POLICY="TimeBasedRollingPolicy" \ + LOG_APPLICATION_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN="/path/to/logs/application-%d{yyyy-MM-dd}.log" \ + LOG_APPLICATION_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY="30" \ + LOG_APPLICATION_SYSLOGAPPENDER_ENABLED="false" \ + LOG_APPLICATION_SYSLOGAPPENDER_HOST="" \ + LOG_APPLICATION_SYSLOGAPPENDER_PORT="514" \ + LOG_APPLICATION_SYSLOGAPPENDER_FACILITY="LOCAL0" \ + LOG_ERROR_FILEAPPENDER_ENABLED="false" \ + LOG_ERROR_FILEAPPENDER_PATHNAME="/path/to/logs/error.log" \ + LOG_ERROR_ROLLINGFILEAPPENDER_ENABLED="false" \ + LOG_ERROR_ROLLINGFILEAPPENDER_PATHNAME="/path/to/logs/error.log" \ + LOG_ERROR_ROLLINGFILEAPPENDER_POLICY="TimeBasedRollingPolicy" \ + LOG_ERROR_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN="/path/to/logs/error-%d{yyyy-MM-dd}.log" \ + LOG_ERROR_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY="30" \ + LOG_ACCESS_CONSOLEAPPENDER_ENABLED="false" \ + LOG_ACCESS_FILEAPPENDER_ENABLED="false" \ + LOG_ACCESS_FILEAPPENDER_PATHNAME="/path/to/logs/access.log" \ + LOG_ACCESS_ROLLINGFILEAPPENDER_ENABLED="false" \ + LOG_ACCESS_ROLLINGFILEAPPENDER_PATHNAME="/path/to/logs/access.log" \ + LOG_ACCESS_ROLLINGFILEAPPENDER_POLICY="TimeBasedRollingPolicy" \ + LOG_ACCESS_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_FILENAME_PATTERN="/path/to/logs/access-%d{yyyy-MM-dd}.log" \ + LOG_ACCESS_ROLLINGFILEAPPENDER_TIMEBASEDROLLINGPOLICY_MAX_HISTORY="30" \ + LOG_ACCESS_SYSLOGAPPENDER_ENABLED="false" \ + LOG_ACCESS_SYSLOGAPPENDER_HOST="" \ + LOG_ACCESS_SYSLOGAPPENDER_PORT="514" \ + LOG_ACCESS_SYSLOGAPPENDER_FACILITY="LOCAL0" COPY . /build RUN /build/setup.sh diff --git a/cantaloupe.properties b/cantaloupe.properties index 5a6f84a..b1e3e38 100644 --- a/cantaloupe.properties +++ b/cantaloupe.properties @@ -24,7 +24,8 @@ https.key_store_password = myPassword https.key_store_path = /path/to/keystore.jks https.key_password = myPassword -# !! Maximum size of the HTTP(S) request queue. Set to 0 to use the default. +# !! Maximum size of the HTTP(S) request queue. Leave blank to use the +# default. http.accept_queue_limit = {{ getenv "HTTP_ACCEPT_QUEUE_LIMIT" }} # Base URI to use for internal links, such as Link headers and JSON-LD @@ -51,7 +52,7 @@ print_stack_trace_on_error_pages = {{ getenv "PRINT_STACK_TRACE_ON_ERROR_PAGES" # DELEGATE SCRIPT ########################################################################### -# !! Enables the delegate script: a Ruby script containing various delegate +# Enables the delegate script: a Ruby script containing various delegate # methods. (See the user manual.) delegate_script.enabled = {{ getenv "DELEGATE_SCRIPT_ENABLED" }} @@ -73,7 +74,10 @@ endpoint.public.auth.basic.enabled = {{ getenv "ENDPOINT_PUBLIC_AUTH_BASIC_ENABL endpoint.public.auth.basic.username = {{ getenv "ENDPOINT_PUBLIC_AUTH_BASIC_USERNAME" }} endpoint.public.auth.basic.secret = {{ getenv "ENDPOINT_PUBLIC_AUTH_BASIC_SECRET" }} +# Enables the IIIF Image API 1.x endpoint, at /iiif/1. endpoint.iiif.1.enabled = {{ getenv "ENDPOINT_IIIF_1_ENABLED" }} + +# Enables the IIIF Image API 2.x endpoint, at /iiif/2. endpoint.iiif.2.enabled = {{ getenv "ENDPOINT_IIIF_2_ENABLED" }} # Controls the response Content-Disposition header for images. Allowed @@ -84,11 +88,11 @@ endpoint.iiif.content_disposition = {{ getenv "ENDPOINT_IIIF_CONTENT_DISPOSITION # Minimum size that will be used in info.json `sizes` keys. endpoint.iiif.min_size = {{ getenv "ENDPOINT_IIIF_MIN_SIZE" }} -# Minimum size that will be used in info.json `tiles` keys. See the user -# manual to learn how these are calculated. +# Minimum size that will be used in info.json `tiles` keys. The user manual +# explains how these are calculated. endpoint.iiif.min_tile_size = {{ getenv "ENDPOINT_IIIF_MIN_TILE_SIZE" }} -# If true, requests for sizes other than those specified in an info.json +# If true, requests for sizes other than those contained in an information # response will be denied. endpoint.iiif.2.restrict_to_sizes = {{ getenv "ENDPOINT_IIIF_2_RESTRICT_TO_SIZES" }} @@ -105,120 +109,131 @@ endpoint.api.username = {{ getenv "ENDPOINT_API_USERNAME" }} endpoint.api.secret = {{ getenv "ENDPOINT_API_SECRET" }} ########################################################################### -# RESOLVERS +# SOURCES ########################################################################### -# Specifies one resolver to translate the identifier in the URL to an image -# source for all requests. Available values are `FilesystemResolver`, -# `HttpResolver`, `JdbcResolver`, `AmazonS3Resolver`, and -# `AzureStorageResolver`. -resolver.static = {{ getenv "RESOLVER_STATIC" }} +# Uses one source for all requests. Available values are `FilesystemSource`, +# `HttpSource`, `JdbcSource`, `S3Source`, and `AzureStorageSource`. +source.static = {{ getenv "SOURCE_STATIC" }} -# If true, `resolver.static` will be overridden, and the -# `get_resolver(identifier)` delegate script method will be used to select -# a resolver per-request. -resolver.delegate = {{ getenv "RESOLVER_DELEGATE" }} +# If true, `source.static` will be overridden, and the `source()` delegate +# method will be used to select a source per-request. +source.delegate = {{ getenv "SOURCE_DELEGATE" }} #---------------------------------------- -# FilesystemResolver +# FilesystemSource #---------------------------------------- # How to look up files. Allowed values are `BasicLookupStrategy` and # `ScriptLookupStrategy`. ScriptLookupStrategy uses the delegate script for # dynamic lookups; see the user manual. -FilesystemResolver.lookup_strategy = {{ getenv "FILESYSTEMRESOLVER_LOOKUP_STRATEGY" }} +FilesystemSource.lookup_strategy = {{ getenv "FILESYSTEMSOURCE_LOOKUP_STRATEGY" }} # Server-side path that will be prefixed to the identifier in the URL. # Trailing slash is important! -FilesystemResolver.BasicLookupStrategy.path_prefix = {{ getenv "FILESYSTEMRESOLVER_BASICLOOKUPSTRATEGY_PATH_PREFIX" }} +FilesystemSource.BasicLookupStrategy.path_prefix = {{ getenv "FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX" }} # Server-side path or extension that will be suffixed to the identifier in # the URL. -FilesystemResolver.BasicLookupStrategy.path_suffix = {{ getenv "FILESYSTEMRESOLVER_BASICLOOKUPSTRATEGY_PATH_SUFFIX" }} +FilesystemSource.BasicLookupStrategy.path_suffix = {{ getenv "FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX" }} #---------------------------------------- -# HttpResolver +# HttpSource #---------------------------------------- -HttpResolver.trust_all_certs = {{ getenv "HTTPRESOLVER_TRUST_ALL_CERTS" }} -HttpResolver.request_timeout = {{ getenv "HTTPRESOLVER_REQUEST_TIMEOUT" }} +HttpSource.trust_all_certs = {{ getenv "HTTPSOURCE_TRUST_ALL_CERTS" }} +HttpSource.request_timeout = {{ getenv "HTTPSOURCE_REQUEST_TIMEOUT" }} -# Tells HttpResolver how to look up resources. Allowed values are +# Tells HttpSource how to look up resources. Allowed values are # `BasicLookupStrategy` and `ScriptLookupStrategy`. ScriptLookupStrategy -# uses the delegate script for dynamic lookups; see the user manual. -HttpResolver.lookup_strategy = {{ getenv "HTTPRESOLVER_LOOKUP_STRATEGY" }} +# uses a delegate method for dynamic lookups; see the user manual. +HttpSource.lookup_strategy = {{ getenv "HTTPSOURCE_LOOKUP_STRATEGY" }} # URL that will be prefixed to the identifier in the request URL. # Trailing slash is important! -HttpResolver.BasicLookupStrategy.url_prefix = {{ getenv "HTTPRESOLVER_BASICLOOKUPSTRATEGY_URL_PREFIX" }} +HttpSource.BasicLookupStrategy.url_prefix = {{ getenv "HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_PREFIX" }} # Path, extension, query string, etc. that will be suffixed to the # identifier in the request URL. -HttpResolver.BasicLookupStrategy.url_suffix = {{ getenv "HTTPRESOLVER_BASICLOOKUPSTRATEGY_URL_SUFFIX" }} +HttpSource.BasicLookupStrategy.url_suffix = {{ getenv "HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_SUFFIX" }} # Enables access to resources that require HTTP Basic authentication. -HttpResolver.auth.basic.username = {{ getenv "HTTPRESOLVER_AUTH_BASIC_USERNAME" }} -HttpResolver.auth.basic.secret = {{ getenv "HTTPRESOLVER_AUTH_BASIC_SECRET" }} +HttpSource.BasicLookupStrategy.auth.basic.username = {{ getenv "HTTPSOURCE_BASICLOOKUPSTRATEGY_AUTH_BASIC_USERNAME" }} +HttpSource.BasicLookupStrategy.auth.basic.secret = {{ getenv "HTTPSOURCE_BASICLOOKUPSTRATEGY_AUTH_BASIC_SECRET" }} #---------------------------------------- -# JdbcResolver +# JdbcSource #---------------------------------------- -# Note: JdbcResolver requires some delegate methods to be implemented in +# Note: JdbcSource requires some delegate methods to be implemented in # addition to the configuration here, and a JDBC driver to be installed on # the classpath; see the user manual. # !! -JdbcResolver.url = {{ getenv "JDBCRESOLVER_URL" }} +JdbcSource.url = {{ getenv "JDBCSOURCE_URL" }} # !! -JdbcResolver.user = {{ getenv "JDBCRESOLVER_USER" }} +JdbcSource.user = {{ getenv "JDBCSOURCE_USER" }} # !! -JdbcResolver.password = {{ getenv "JDBCRESOLVER_PASSWORD" }} +JdbcSource.password = {{ getenv "JDBCSOURCE_PASSWORD" }} # !! Connection timeout in seconds. -JdbcResolver.connection_timeout = {{ getenv "JDBCRESOLVER_CONNECTION_TIMEOUT" }} +JdbcSource.connection_timeout = {{ getenv "JDBCSOURCE_CONNECTION_TIMEOUT" }} #---------------------------------------- -# AmazonS3Resolver +# S3Source #---------------------------------------- +# !! Endpoint URI. +# For AWS endpoints, see: +# https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region +S3Source.endpoint = {{ getenv "S3SOURCE_ENDPOINT" }} + # !! Credentials for your AWS account. # See: http://aws.amazon.com/security-credentials # Note that this info can be obtained from elsewhere rather than setting # it here; see the user manual. -AmazonS3Resolver.access_key_id = {{ getenv "AMAZONS3RESOLVER_ACCESS_KEY_ID" }} -AmazonS3Resolver.secret_key = {{ getenv "AMAZONS3RESOLVER_SECRET_KEY" }} - -# !! Name of the bucket containing images to be served. -AmazonS3Resolver.bucket.name = {{ getenv "AMAZONS3RESOLVER_BUCKET_NAME" }} +S3Source.access_key_id = {{ getenv "S3SOURCE_ACCESS_KEY_ID" }} +S3Source.secret_key = {{ getenv "S3SOURCE_SECRET_KEY" }} -# !! See: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region -AmazonS3Resolver.bucket.region = {{ getenv "AMAZONS3RESOLVER_BUCKET_REGION" }} +# !! Maximum number of concurrent HTTP connections to AWS. Leave blank to +# use the default. +S3Source.max_connections = {{ getenv "S3SOURCE_MAX_CONNECTIONS" }} -# Tells AmazonS3Resolver how to look up objects. Allowed values are +# Tells S3Source how to look up objects. Allowed values are # `BasicLookupStrategy` and `ScriptLookupStrategy`. ScriptLookupStrategy -# uses the delegate script for dynamic lookups; see the user manual. -AmazonS3Resolver.lookup_strategy = {{ getenv "AMAZONS3RESOLVER_LOOKUP_STRATEGY" }} +# uses a delegate method for dynamic lookups; see the user manual. +S3Source.lookup_strategy = {{ getenv "S3SOURCE_LOOKUP_STRATEGY" }} -# !! Maximum number of concurrent HTTP connections to AWS. Leave blank to -# use the default. -AmazonS3Resolver.max_connections = {{ getenv "AMAZONS3RESOLVER_MAX_CONNECTIONS" }} +# !! Name of the bucket containing images to be served. +S3Source.BasicLookupStrategy.bucket.name = {{ getenv "S3SOURCE_BASICLOOKUPSTRATEGY_BUCKET_NAME" }} + +# Path within the bucket that will be prefixed to the identifier in the URL. +# Trailing slash is important! +S3Source.BasicLookupStrategy.path_prefix = {{ getenv "S3SOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX" }} + +# Path or extension that will be suffixed to the identifier in the URL. +S3Source.BasicLookupStrategy.path_suffix = {{ getenv "S3SOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX" }} #---------------------------------------- -# AzureStorageResolver +# AzureStorageSource #---------------------------------------- -# !! Credentials for your Azure account. -AzureStorageResolver.account_name = {{ getenv "AZURESTORAGERESOLVER_ACCOUNT_NAME" }} -AzureStorageResolver.account_key = {{ getenv "AZURESTORAGERESOLVER_ACCOUNT_KEY" }} +# !! Name of your Azure account. +# Leave blank if using URI with a SAS token in your object key. +AzureStorageSource.account_name = {{ getenv "AZURESTORAGESOURCE_ACCOUNT_NAME" }} + +# !! Key of your Azure account. +# Leave blank if using URI with a SAS token in your object key. +AzureStorageSource.account_key = {{ getenv "AZURESTORAGESOURCE_ACCOUNT_KEY" }} # !! Name of the container containing images to be served. -AzureStorageResolver.container_name = {{ getenv "AZURESTORAGERESOLVER_CONTAINER_NAME" }} +# Leave blank if using URI with the container in your object key. +AzureStorageSource.container_name = {{ getenv "AZURESTORAGESOURCE_CONTAINER_NAME" }} -# Tells AzureStorageResolver how to look up objects. Allowed values are +# Tells AzureStorageSource how to look up objects. Allowed values are # `BasicLookupStrategy` and `ScriptLookupStrategy`. ScriptLookupStrategy -# uses the delegate script for dynamic lookups; see the user manual. -AzureStorageResolver.lookup_strategy = {{ getenv "AZURESTORAGERESOLVER_LOOKUP_STRATEGY" }} +# uses a delegate method for dynamic lookups; see the user manual. +AzureStorageSource.lookup_strategy = {{ getenv "AZURESTORAGESOURCE_LOOKUP_STRATEGY" }} ########################################################################### # PROCESSORS @@ -230,8 +245,8 @@ AzureStorageResolver.lookup_strategy = {{ getenv "AZURESTORAGERESOLVER_LOOKUP_ST # Image processors to use for various source formats. Available values are # `Java2dProcessor`, `GraphicsMagickProcessor`, `ImageMagickProcessor`, -# `KakaduProcessor`, `OpenJpegProcessor`, `JaiProcessor`, `PdfBoxProcessor`, -# and `FfmpegProcessor`. +# `KakaduDemoProcessor`, `KakaduNativeProcessor`, `OpenJpegProcessor`, +# `JaiProcessor`, `PdfBoxProcessor`, and `FfmpegProcessor`. # These extension-specific definitions are optional. processor.avi = {{ getenv "PROCESSOR_AVI" }} @@ -257,11 +272,27 @@ processor.fallback = {{ getenv "PROCESSOR_FALLBACK" }} # Global Processor Configuration #---------------------------------------- +# Controls how content is fed to processors from stream-based sources. +# * `StreamStrategy` will try to stream a source image from a source when +# possible, and use `processor.fallback_retrieval_strategy` otherwise. +# * `DownloadStrategy` will download it to a temporary file, and delete +# it after the request is complete. +# * `CacheStrategy` will download it into the source cache using +# FilesystemCache, which must also be configured. (This will perform a +# lot better than DownloadStrategy if you can spare the disk space.) +processor.stream_retrieval_strategy = {{ getenv "PROCESSOR_STREAM_RETRIEVAL_STRATEGY" }} + +# Controls how an incompatible StreamSource + FileProcessor combination is +# dealt with. +# * `DownloadStrategy` and `CacheStrategy` work the same as above. +# * `AbortStrategy` causes the request to fail. +processor.fallback_retrieval_strategy = {{ getenv "PROCESSOR_FALLBACK_RETRIEVAL_STRATEGY" }} + # Resolution of vector rasterization (of e.g. PDFs) at a scale of 1. processor.dpi = {{ getenv "PROCESSOR_DPI" }} -# Expands contrast to utilize available dynamic range. This forces the entire -# source image to be read into memory, so can be slow with large images. +# Expands contrast to utilize available dynamic range. This usually requires +# the whole source image to be read into memory, so it can be inefficient. processor.normalize = {{ getenv "PROCESSOR_NORMALIZE" }} # Color of the background when an image is rotated or alpha-flattened, for @@ -270,7 +301,8 @@ processor.normalize = {{ getenv "PROCESSOR_NORMALIZE" }} processor.background_color = {{ getenv "PROCESSOR_BACKGROUND_COLOR" }} # Available values are `bell`, `bspline`, `bicubic`, `box`, `hermite`, -# `lanczos3`, `mitchell`, `triangle`. (JaiProcessor ignores these.) +# `lanczos3`, `mitchell`, `triangle`. (JaiProcessor & KakaduNativeProcessor +# ignore these.) processor.downscale_filter = {{ getenv "PROCESSOR_DOWNSCALE_FILTER" }} processor.upscale_filter = {{ getenv "PROCESSOR_UPSCALE_FILTER" }} @@ -285,11 +317,6 @@ processor.metadata.preserve = {{ getenv "PROCESSOR_METADATA_PRESERVE" }} # The check for this field can impair performance slightly. processor.metadata.respect_orientation = {{ getenv "PROCESSOR_METADATA_RESPECT_ORIENTATION" }} -# Whether to reduce images with more than 8 bits per sample to 8 bits. -# This only applies to formats that support >8-bit samples, and not all -# processors respect this setting; see the user manual. -processor.limit_to_8_bits = {{ getenv "PROCESSOR_LIMIT_TO_8_BITS" }} - # Progressive JPEGs are usually more compact. processor.jpg.progressive = {{ getenv "PROCESSOR_JPG_PROGRESSIVE" }} @@ -300,11 +327,21 @@ processor.jpg.quality = {{ getenv "PROCESSOR_JPG_QUALITY" }} # `LZW`, and `RLE`. Leave blank for no compression. processor.tif.compression = {{ getenv "PROCESSOR_TIF_COMPRESSION" }} -# Available values are `StreamStrategy` and `CacheStrategy`. StreamStrategy -# will try to stream source images from non-filesystem resolvers, when this -# is possible; CacheStrategy will first download them into the source cache -# using FilesystemCache, which must also be configured. -StreamProcessor.retrieval_strategy = {{ getenv "STREAMPROCESSOR_RETRIEVAL_STRATEGY" }} +#---------------------------------------- +# ImageIO Plugin Preferences +#---------------------------------------- + +# These override the default plugins used by the application and should not +# normally be changed. +processor.imageio.bmp.reader = {{ getenv "PROCESSOR_IMAGEIO_BMP_READER" }} +processor.imageio.gif.reader = {{ getenv "PROCESSOR_IMAGEIO_GIF_READER" }} +processor.imageio.gif.writer = {{ getenv "PROCESSOR_IMAGEIO_GIF_WRITER" }} +processor.imageio.jpg.reader = {{ getenv "PROCESSOR_IMAGEIO_JPG_READER" }} +processor.imageio.jpg.writer = {{ getenv "PROCESSOR_IMAGEIO_JPG_WRITER" }} +processor.imageio.png.reader = {{ getenv "PROCESSOR_IMAGEIO_PNG_READER" }} +processor.imageio.png.writer = {{ getenv "PROCESSOR_IMAGEIO_PNG_WRITER" }} +processor.imageio.tif.reader = {{ getenv "PROCESSOR_IMAGEIO_TIF_READER" }} +processor.imageio.tif.writer = {{ getenv "PROCESSOR_IMAGEIO_TIF_WRITER" }} #---------------------------------------- # FfmpegProcessor @@ -331,18 +368,18 @@ GraphicsMagickProcessor.path_to_binaries = ImageMagickProcessor.path_to_binaries = #---------------------------------------- -# KakaduProcessor +# KakaduDemoProcessor #---------------------------------------- -# Optional absolute path of the directory containing the Kakadu binaries. +# Optional absolute path of the directory containing kdu_expand. # Overrides the PATH. -KakaduProcessor.path_to_binaries = +KakaduDemoProcessor.path_to_binaries = #---------------------------------------- # OpenJpegProcessor #---------------------------------------- -# Optional absolute path of the directory containing the OpenJPEG binaries. +# Optional absolute path of the directory containing opj_decompress. # Overrides the PATH. OpenJpegProcessor.path_to_binaries = @@ -367,31 +404,33 @@ cache.client.no_transform = {{ getenv "CACHE_CLIENT_NO_TRANSFORM" }} # SERVER-SIDE CACHING ########################################################################### -# Enables the source cache. Note that source images will only be cached -# when a FileProcessor is used with a StreamResolver, or when a -# StreamProcessor is used with `StreamProcessor.retrieval_strategy` set to -# `CacheStrategy`. -cache.server.source.enabled = {{ getenv "CACHE_SERVER_SOURCE_ENABLED" }} +# N.B.: The source cache may be used if the +# `processor.stream_retrieval_strategy` and/or +# `processor.fallback_retrieval_strategy` keys are set to `CacheStrategy`. # FilesystemCache is the only available source cache. cache.server.source = {{ getenv "CACHE_SERVER_SOURCE" }} +# Amount of time source cache content remains valid. Set to blank or 0 +# for forever. +cache.server.source.ttl_seconds = {{ getenv "CACHE_SERVER_SOURCE_TTL_SECONDS" }} + # Enables the derivative (processed image) cache. cache.server.derivative.enabled = {{ getenv "CACHE_SERVER_DERIVATIVE_ENABLED" }} # Available values are `FilesystemCache`, `JdbcCache`, `RedisCache`, -# `HeapCache`, `AmazonS3Cache`, and `AzureStorageCache`. +# `HeapCache`, `S3Cache`, and `AzureStorageCache`. cache.server.derivative = {{ getenv "CACHE_SERVER_DERIVATIVE" }} +# Amount of time derivative cache content remains valid. Set to blank or 0 +# for forever. +cache.server.derivative.ttl_seconds = {{ getenv "CACHE_SERVER_DERIVATIVE_TTL_SECONDS" }} + # Whether to use the Java heap as a "level 1" cache for image infos, either # independently or in front of a "level 2" derivative cache (if enabled). cache.server.info.enabled = {{ getenv "CACHE_SERVER_INFO_ENABLED" }} -# Time before cached content (excluding info cache content) becomes invalid. -# Set to blank or 0 for never. -cache.server.ttl_seconds = {{ getenv "CACHE_SERVER_TTL_SECONDS" }} - -# If true, when a resolver reports that the requested source image has gone +# If true, when a source reports that the requested source image has gone # missing, all cached information relating to it (if any) will be deleted. # (This is effectively always false when cache.server.resolve_first is also # false.) @@ -406,7 +445,8 @@ cache.server.resolve_first = {{ getenv "CACHE_SERVER_RESOLVE_FIRST" }} # items in the background. cache.server.worker.enabled = {{ getenv "CACHE_SERVER_WORKER_ENABLED" }} -# !! The cache worker will start its shifts this many seconds apart. +# !! The cache worker will wait this many seconds before starting its +# next shift. cache.server.worker.interval = {{ getenv "CACHE_SERVER_WORKER_INTERVAL" }} #---------------------------------------- @@ -417,11 +457,11 @@ cache.server.worker.interval = {{ getenv "CACHE_SERVER_WORKER_INTERVAL" }} FilesystemCache.pathname = {{ getenv "FILESYSTEMCACHE_PATHNAME" }} # Levels of folder hierarchy in which to store cached images. Deeper depth -# results in fewer files per directory. Set to 0 to disable subfolders. +# results in fewer files per directory. Set to 0 to disable subdirectories. # Purge the cache after changing this. FilesystemCache.dir.depth = {{ getenv "FILESYSTEMCACHE_DIR_DEPTH" }} -# Number of characters in hierarchy directory names. Should be set to +# Number of characters in tree directory names. Should be set to # 16^n < (max number of directory entries your filesystem can deal with). # Purge the cache after changing this. FilesystemCache.dir.name_length = {{ getenv "FILESYSTEMCACHE_DIR_NAME_LENGTH" }} @@ -432,11 +472,11 @@ FilesystemCache.dir.name_length = {{ getenv "FILESYSTEMCACHE_DIR_NAME_LENGTH" }} # Target cache size, in bytes or a number ending in M, MB, G, GB, etc. # This is not a hard limit, and may be transiently exceeded. -# Ensure your heap can accommodate this size using the -Xmx= VM argument. +# Ensure your heap can accommodate this size. HeapCache.target_size = {{ getenv "HEAPCACHE_TARGET_SIZE" }} -# If true, the cache contents will be written to a file on exit, and read -# back in at startup. +# If true, the cache contents will be written to a file on exit and during +# cache worker shifts, and read back in at startup. HeapCache.persist = {{ getenv "HEAPCACHE_PERSIST" }} # When the contents are persisted, this specifies the location of the cache @@ -463,28 +503,30 @@ JdbcCache.derivative_image_table = {{ getenv "JDBCCACHE_DERIVATIVE_IMAGE_TABLE" JdbcCache.info_table = {{ getenv "JDBCCACHE_INFO_TABLE" }} #---------------------------------------- -# AmazonS3Cache +# S3Cache #---------------------------------------- +# !! Endpoint URI. +# For AWS endpoints, see: +# https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region +S3Cache.endpoint = {{ getenv "S3CACHE_ENDPOINT" }} + # !! Credentials for your AWS account. # See: http://aws.amazon.com/security-credentials # Note that this info can be obtained from elsewhere rather than setting it # here; see the user manual. -AmazonS3Cache.access_key_id = {{ getenv "AMAZONS3CACHE_ACCESS_KEY_ID" }} -AmazonS3Cache.secret_key = {{ getenv "AMAZONS3CACHE_SECRET_KEY" }} +S3Cache.access_key_id = {{ getenv "S3CACHE_ACCESS_KEY_ID" }} +S3Cache.secret_key = {{ getenv "S3CACHE_SECRET_KEY" }} # !! Name of a bucket to use to hold cached data. -AmazonS3Cache.bucket.name = {{ getenv "AMAZONS3CACHE_BUCKET_NAME" }} - -# See: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region -AmazonS3Cache.bucket.region = {{ getenv "AMAZONS3CACHE_BUCKET_REGION" }} +S3Cache.bucket.name = {{ getenv "S3CACHE_BUCKET_NAME" }} # !! String that will be prefixed to object keys. -AmazonS3Cache.object_key_prefix = {{ getenv "AMAZONS3CACHE_OBJECT_KEY_PREFIX" }} +S3Cache.object_key_prefix = {{ getenv "S3CACHE_OBJECT_KEY_PREFIX" }} # !! Maximum number of concurrent HTTP connections to AWS. Leave blank to # use the default. -AmazonS3Cache.max_connections = {{ getenv "AMAZONS3CACHE_MAX_CONNECTIONS" }} +S3Cache.max_connections = {{ getenv "S3CACHE_MAX_CONNECTIONS" }} #---------------------------------------- # AzureStorageCache @@ -520,8 +562,7 @@ overlays.enabled = {{ getenv "OVERLAYS_ENABLED" }} # Controls how overlays are configured. `BasicStrategy` will use the # `overlays.BasicStrategy.*` keys in this section. `ScriptStrategy` will -# use the `overlay` delegate method. See the user manual for more -# information. +# use a delegate method. (See the user manual.) overlays.strategy = {{ getenv "OVERLAYS_STRATEGY" }} # `image` or `string`. diff --git a/setup.sh b/setup.sh index 9272ffd..ef412bc 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash MYSQL_LIB_VERSION=5.1.44 -CANTALOUPE_VERSION=3.4.2 +CANTALOUPE_VERSION=4.0 GOSU_VERSION=1.10 OPENJPEG_VERSION=2.3.0 @@ -47,8 +47,9 @@ mkdir /cantaloupe/images wget -q http://central.maven.org/maven2/mysql/mysql-connector-java/$MYSQL_LIB_VERSION/mysql-connector-java-$MYSQL_LIB_VERSION.jar -O /cantaloupe/lib/mysql-connector.jar wget -q https://github.com/medusa-project/cantaloupe/releases/download/v$CANTALOUPE_VERSION/Cantaloupe-$CANTALOUPE_VERSION.zip -O /cantaloupe/cantaloupe.zip unzip /cantaloupe/cantaloupe.zip -d /cantaloupe -mv /cantaloupe/Cantaloupe-$CANTALOUPE_VERSION/Cantaloupe-$CANTALOUPE_VERSION.war /cantaloupe/cantaloupe.war -rm -Rf /cantaloupe/Cantaloupe-$CANTALOUPE_VERSION +mv /cantaloupe/cantaloupe-$CANTALOUPE_VERSION/cantaloupe-$CANTALOUPE_VERSION.war /cantaloupe/cantaloupe.war +mv /cantaloupe/cantaloupe-$CANTALOUPE_VERSION/delegates.rb.sample /cantaloupe/delegates.rb +rm -Rf /cantaloupe/cantaloupe-$CANTALOUPE_VERSION rm /cantaloupe/cantaloupe.zip # Setup confd templates