From 1c8f7b0316a4e6b2c5ce301b76e68e4e68500ee9 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 15 Oct 2026 15:28:54 +0300 Subject: [PATCH] use jemalloc --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ee883b70d..e6f2d6cc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ ENV OPENSSL_CONF=/etc/openssl_legacy.cnf WORKDIR /app -RUN apk add --no-cache libpq vips redis onnxruntime leptonica && \ +RUN apk add --no-cache libpq vips redis onnxruntime leptonica jemalloc && \ rm -f /usr/bin/onnx_test_runner /usr/bin/onnxruntime_test RUN addgroup -g 2000 docuseal && adduser -u 2000 -G docuseal -s /bin/sh -D -h /home/docuseal docuseal @@ -100,6 +100,8 @@ ENV HOME=/home/docuseal ENV WORKDIR=/data/docuseal ENV VIPS_MAX_COORD=17000 ENV VIPS_BLOCK_UNTRUSTED=1 +ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true EXPOSE 3000 CMD ["/app/bin/bundle", "exec", "puma", "-C", "/app/config/puma.rb", "--dir", "/app"]