diff --git a/cantaloupe/Dockerfile b/cantaloupe/Dockerfile index 2d69baff..f8af8e53 100644 --- a/cantaloupe/Dockerfile +++ b/cantaloupe/Dockerfile @@ -36,7 +36,10 @@ RUN --mount=type=cache,id=cantaloupe-apk-${TARGETARCH},sharing=locked,target=/va apk add \ ffmpeg \ openjpeg-tools \ + libjpeg-turbo \ && \ + mkdir -p /opt/libjpeg-turbo/lib && \ + ln -s /usr/lib/libturbojpeg.so.0 /opt/libjpeg-turbo/lib/libturbojpeg.so && \ create-service-user.sh --name cantaloupe --group jwt /data /opt/cantaloupe/logs && \ cleanup.sh @@ -97,6 +100,8 @@ ENV \ CANTALOUPE_FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX= \ CANTALOUPE_FILESYSTEMSOURCE_LOOKUP_STRATEGY="BasicLookupStrategy" \ CANTALOUPE_GROKPROCESSOR_PATH_TO_BINARIES= \ + CANTALOUPE_HEAP_MIN="3G" \ + CANTALOUPE_HEAP_MAX="5G" \ CANTALOUPE_HEAPCACHE_PERSIST_FILESYSTEM_PATHNAME="/data/heap.cache" \ CANTALOUPE_HEAPCACHE_PERSIST="false" \ CANTALOUPE_HEAPCACHE_TARGET_SIZE="2G" \ diff --git a/cantaloupe/README.md b/cantaloupe/README.md index 44aaae53..ddfcf1ab 100644 --- a/cantaloupe/README.md +++ b/cantaloupe/README.md @@ -83,6 +83,8 @@ additional settings, volumes, ports, etc. | CANTALOUPE_FILESYSTEMSOURCE_BASICLOOKUPSTRATEGY_PATH_SUFFIX | | | CANTALOUPE_FILESYSTEMSOURCE_LOOKUP_STRATEGY | "BasicLookupStrategy" | | CANTALOUPE_GROKPROCESSOR_PATH_TO_BINARIES | | +| CANTALOUPE_HEAP_MIN | "3G" | +| CANTALOUPE_HEAP_MAX | "5G" | | CANTALOUPE_HEAPCACHE_PERSIST_FILESYSTEM_PATHNAME | "/data/heap.cache" | | CANTALOUPE_HEAPCACHE_PERSIST | "false" | | CANTALOUPE_HEAPCACHE_TARGET_SIZE | "2G" | diff --git a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe/run b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe/run index ac871195..18e1e403 100755 --- a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe/run +++ b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe/run @@ -1,8 +1,9 @@ -#!/usr/bin/env bash +#!/command/with-contenv bash +# shellcheck shell=bash set -e # When bind mounting we need to ensure that we # actually can write to the folder. chown cantaloupe:cantaloupe /data -exec s6-setuidgid cantaloupe java -Dcantaloupe.config=/opt/cantaloupe/cantaloupe.properties -jar /opt/cantaloupe/cantaloupe.jar +exec with-contenv s6-setuidgid cantaloupe java -Dcantaloupe.config=/opt/cantaloupe/cantaloupe.properties -Xms"${CANTALOUPE_HEAP_MIN}" -Xmx"${CANTALOUPE_HEAP_MAX}" -jar /opt/cantaloupe/cantaloupe.jar