From 13a4af43008a642e9ba88eaeefcabdda841d0b3a Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 26 Jan 2026 14:44:59 +0100 Subject: [PATCH] jotty: full refactor / now use prebuild packages and less ressources (#11059) * jotty: full refactor / now use prebuild packages and less ressources * add latest * llatest --- ct/jotty.sh | 54 +++++---------------------------- frontend/public/json/jotty.json | 13 +++----- install/jotty-install.sh | 28 +++-------------- 3 files changed, 16 insertions(+), 79 deletions(-) diff --git a/ct/jotty.sh b/ct/jotty.sh index ab6e94f9d..bb2fac12b 100644 --- a/ct/jotty.sh +++ b/ct/jotty.sh @@ -7,9 +7,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV APP="jotty" var_tags="${var_tags:-tasks;notes}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-4096}" -var_disk="${var_disk:-8}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" var_os="${var_os:-debian}" var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" @@ -35,61 +35,21 @@ function update_script() { msg_ok "Stopped Service" msg_info "Backing up configuration & data" - cd /opt/jotty - cp ./.env /opt/app.env - $STD tar -cf /opt/data_config.tar ./data ./config + cp /opt/jotty/.env /opt/app.env + [[ -d /opt/jotty/data ]] && mv /opt/jotty/data /opt/data msg_ok "Backed up configuration & data" NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jotty" "fccview/jotty" "tarball" "latest" "/opt/jotty" - - msg_info "Updating jotty" - cd /opt/jotty - unset NODE_OPTIONS - export NODE_OPTIONS="--max-old-space-size=3072" - $STD yarn --frozen-lockfile - $STD yarn next telemetry disable - $STD yarn build - - [ -d "public" ] && cp -r public .next/standalone/ - [ -d "howto" ] && cp -r howto .next/standalone/ - mkdir -p .next/standalone/.next - cp -r .next/static .next/standalone/.next/ - - mv .next/standalone /tmp/jotty_standalone - rm -rf ./* .next .git .gitignore .yarn - mv /tmp/jotty_standalone/* . - mv /tmp/jotty_standalone/.[!.]* . 2>/dev/null || true - rm -rf /tmp/jotty_standalone - msg_ok "Updated jotty" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jotty" "fccview/jotty" "prebuild" "latest" "/opt/jotty" "jotty_*_prebuild.tar.gz" msg_info "Restoring configuration & data" mv /opt/app.env /opt/jotty/.env - $STD tar -xf /opt/data_config.tar + [[ -d /opt/data ]] && mv /opt/data /opt/jotty/data msg_ok "Restored configuration & data" - msg_info "Updating Service" - cat </etc/systemd/system/jotty.service -[Unit] -Description=jotty server -After=network.target - -[Service] -WorkingDirectory=/opt/jotty -EnvironmentFile=/opt/jotty/.env -ExecStart=/usr/bin/node server.js -Restart=on-abnormal - -[Install] -WantedBy=multi-user.target -EOF - systemctl daemon-reload - msg_ok "Updated Service" - msg_info "Starting Service" systemctl start jotty msg_ok "Started Service" - rm /opt/data_config.tar msg_ok "Updated successfully!" fi exit diff --git a/frontend/public/json/jotty.json b/frontend/public/json/jotty.json index 4464881aa..c04487c94 100644 --- a/frontend/public/json/jotty.json +++ b/frontend/public/json/jotty.json @@ -19,9 +19,9 @@ "type": "default", "script": "ct/jotty.sh", "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 8, + "cpu": 1, + "ram": 1024, + "hdd": 5, "os": "debian", "version": "13" } @@ -31,10 +31,5 @@ "username": null, "password": null }, - "notes": [ - { - "text": "jotty was previously named rwMarkable", - "type": "info" - } - ] + "notes": [] } diff --git a/install/jotty-install.sh b/install/jotty-install.sh index 2ba7e2402..e4f01c94e 100644 --- a/install/jotty-install.sh +++ b/install/jotty-install.sh @@ -14,33 +14,16 @@ network_check update_os NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs -fetch_and_deploy_gh_release "jotty" "fccview/jotty" "tarball" "latest" "/opt/jotty" - -msg_info "Installing ${APPLICATION}" -cd /opt/jotty -unset NODE_OPTIONS -export NODE_OPTIONS="--max-old-space-size=3072" -$STD yarn --frozen-lockfile -$STD yarn next telemetry disable -$STD yarn build - -[ -d "public" ] && cp -r public .next/standalone/ -[ -d "howto" ] && cp -r howto .next/standalone/ -mkdir -p .next/standalone/.next -cp -r .next/static .next/standalone/.next/ - -mv .next/standalone /tmp/jotty_standalone -rm -rf ./* .next .git .gitignore .yarn -mv /tmp/jotty_standalone/* . -mv /tmp/jotty_standalone/.[!.]* . 2>/dev/null || true -rm -rf /tmp/jotty_standalone +fetch_and_deploy_gh_release "jotty" "fccview/jotty" "prebuild" "latest" "/opt/jotty" "jotty_*_prebuild.tar.gz" +msg_info "Setup jotty" mkdir -p data/{users,checklists,notes} cat </opt/jotty/.env NODE_ENV=production - # --- Uncomment to enable +# APP_URL=https://your-jotty-domain.com +# INTERNAL_API_URL=http://localhost:3000 # HTTPS=true # SERVE_PUBLIC_IMAGES=yes # SERVE_PUBLIC_FILES=yes @@ -53,12 +36,11 @@ NODE_ENV=production # SSO_MODE=oidc # OIDC_ISSUER= # OIDC_CLIENT_ID= -# APP_URL= # SSO_FALLBACK_LOCAL=yes # OIDC_CLIENT_SECRET=your_client_secret # OIDC_ADMIN_GROUPS=admins EOF -msg_ok "Installed ${APPLICATION}" +msg_ok "Setup jotty" msg_info "Creating Service" cat </etc/systemd/system/jotty.service