From 98791d1427a5364cb43b6a76c7bcd48d4d47dfe0 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 17 Apr 2026 08:42:46 +0200 Subject: [PATCH] fix(papermark): add missing EE env vars, increase RAM to 4096, add NODE_OPTIONS for build - HANKO_API_KEY and NEXT_PUBLIC_HANKO_TENANT_ID are required at build time (module throws hard error if unset during page data collection) - QSTASH_TOKEN, NEXT_PRIVATE_DOCUMENT_PASSWORD_KEY, NEXT_PRIVATE_VERIFICATION_SECRET added as placeholders/random values - NODE_OPTIONS=--max-old-space-size=3584 for npm run build (Next.js OOM fix) - RAM raised from 2048 to 4096 (Next.js build requires ~3.5GB heap) --- ct/papermark.sh | 2 +- install/papermark-install.sh | 7 ++++++- json/papermark.json | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ct/papermark.sh b/ct/papermark.sh index 883e13e6..89014718 100644 --- a/ct/papermark.sh +++ b/ct/papermark.sh @@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV APP="Papermark" var_tags="${var_tags:-documents;sharing;analytics}" var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" +var_ram="${var_ram:-4096}" var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" diff --git a/install/papermark-install.sh b/install/papermark-install.sh index 12ca524a..5a349271 100644 --- a/install/papermark-install.sh +++ b/install/papermark-install.sh @@ -31,12 +31,17 @@ NEXTAUTH_URL=http://${LOCAL_IP}:3000 NEXT_PUBLIC_BASE_URL=http://${LOCAL_IP}:3000 NEXT_PUBLIC_APP_BASE_HOST=app.example.local NEXT_PUBLIC_WEBHOOK_BASE_HOST=webhooks.example.local +HANKO_API_KEY=placeholder +NEXT_PUBLIC_HANKO_TENANT_ID=placeholder +QSTASH_TOKEN=placeholder +NEXT_PRIVATE_DOCUMENT_PASSWORD_KEY=$(openssl rand -hex 32) +NEXT_PRIVATE_VERIFICATION_SECRET=$(openssl rand -hex 32) NODE_ENV=production EOF $STD npm install $STD npx prisma generate $STD npx prisma migrate deploy -$STD npm run build +NODE_OPTIONS="--max-old-space-size=3584" $STD npm run build msg_ok "Set up Papermark" msg_info "Creating Service" diff --git a/json/papermark.json b/json/papermark.json index bc123e77..e75d2935 100644 --- a/json/papermark.json +++ b/json/papermark.json @@ -20,7 +20,7 @@ "config_path": "/opt/papermark/.env", "resources": { "cpu": 2, - "ram": 2048, + "ram": 4096, "hdd": 8, "os": "Debian", "version": "13" @@ -37,4 +37,4 @@ "type": "warning" } ] -} +} \ No newline at end of file