Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 307 - Adding xms and xmx for Cantaloupe heap #310

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cantaloupe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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" \
Expand Down
2 changes: 2 additions & 0 deletions cantaloupe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" |
Expand Down
5 changes: 3 additions & 2 deletions cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe/run
Original file line number Diff line number Diff line change
@@ -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
Loading