diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b1a6ee56f..3a9225cb6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -37,3 +37,14 @@ Link: # ## 📋 Additional Information (optional) + +--- + +## 📦 Application Requirements (for new scripts) + +> Required for **🆕 New script** submissions. +> PRs that do not meet these requirements may be closed without review. +- [ ] The application is **at least 6 months old** +- [ ] The application is **actively maintained** +- [ ] The application has **200+ GitHub stars** +- [ ] Official **release tarballs** are published diff --git a/ct/papra.sh b/ct/papra.sh index 7804d77e8..29c11adc1 100644 --- a/ct/papra.sh +++ b/ct/papra.sh @@ -3,7 +3,7 @@ source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxV # Copyright (c) 2021-2026 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/CorentinTh/papra +# Source: https://github.com/papra-hq/papra APP="Papra" var_tags="${var_tags:-document-management}" @@ -27,17 +27,28 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_info "Updating Papra LXC" - systemctl stop papra - cd /opt/papra - git fetch - git pull - $STD pnpm install --frozen-lockfile - $STD pnpm --filter "@papra/app-client..." run build - $STD pnpm --filter "@papra/app-server..." run build - systemctl start papra - msg_ok "Updated Papra LXC" - msg_ok "Updated successfully!" + RELEASE=$(curl -fsSL https://api.github.com/repos/papra-hq/papra/releases | grep -oP '"tag_name":\s*"\K@papra/docker@[^"]+' | head -n1) + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping Service" + systemctl stop papra + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt/papra + fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball" "${RELEASE}" "/opt/papra" + $STD pnpm install --frozen-lockfile + $STD pnpm --filter "@papra/app-client..." run build + $STD pnpm --filter "@papra/app-server..." run build + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting Service" + systemctl start papra + msg_ok "Started Service" + msg_ok "Updated successfully!" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit } @@ -46,4 +57,6 @@ build_container description msg_ok "Completed successfully!\n" -msg_custom "🚀" "${GN}" "${APP} setup has been successfully initialized!" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1221${CL}" diff --git a/ct/sportarr.sh b/ct/sportarr.sh deleted file mode 100644 index 68c932992..000000000 --- a/ct/sportarr.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2026 community-scripts ORG -# Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/Sportarr/Sportarr - -APP="Sportarr" -var_tags="${var_tags:-arr}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-8}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/sportarr ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "sportarr" "Sportarr/Sportarr"; then - msg_info "Stopping Services" - systemctl stop sportarr - msg_ok "Stopped Services" - - fetch_and_deploy_gh_release "sportarr" "Sportarr/Sportarr" "prebuild" "latest" "/opt/sportarr" "Sportarr-linux-x64-*.tar.gz" - - msg_info "Starting Services" - systemctl start sportarr - msg_ok "Started Services" - msg_ok "Updated successfully!" - fi - exit -} - -start -build_container -description - -msg_ok "Completed successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1867${CL}" diff --git a/frontend/public/json/sportarr.json b/frontend/public/json/sportarr.json deleted file mode 100644 index fd0ec06fc..000000000 --- a/frontend/public/json/sportarr.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Sportarr", - "slug": "sportarr", - "categories": [ - 14 - ], - "date_created": "2025-12-12", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 1867, - "documentation": "https://sportarr.net/docs", - "config_path": "/opt/sportarr/.env, /opt/sportarr-data/config/config.xml", - "website": "https://sportarr.net/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/sportarr.webp", - "description": "Sportarr is an automated media management application for all sports. It works similar to Sonarr and Radarr but specifically designed for combat sports, basketball, football, hockey, motorsports, and hundreds of other sports worldwide.", - "install_methods": [ - { - "type": "default", - "script": "ct/sportarr.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 8, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The resources assigned to LXC are considered baseline. Please adjust to match your workload.", - "type": "info" - } - ] -} diff --git a/install/papra-install.sh b/install/papra-install.sh index 3a1de4b2b..efb8cfff0 100644 --- a/install/papra-install.sh +++ b/install/papra-install.sh @@ -3,7 +3,7 @@ # Copyright (c) 2021-2026 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/CorentinTh/papra +# Source: https://github.com/papra-hq/papra source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color @@ -15,26 +15,22 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - git \ - build-essential \ - tesseract-ocr \ - tesseract-ocr-all + build-essential \ + tesseract-ocr \ + tesseract-ocr-all msg_ok "Installed Dependencies" NODE_VERSION="24" setup_nodejs -msg_info "Cloning Papra Repository" -cd /opt -RELEASE=$(curl -s https://api.github.com/repos/papra-hq/papra/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') -$STD git clone --depth=1 --branch ${RELEASE} https://github.com/papra-hq/papra.git -cd papra -msg_ok "Cloned Papra Repository" +RELEASE=$(curl -fsSL https://api.github.com/repos/papra-hq/papra/releases | grep -oP '"tag_name":\s*"\K@papra/docker@[^"]+' | head -n1) +fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball" "${RELEASE}" "/opt/papra" msg_info "Setup Papra" +cd /opt/papra export COREPACK_ENABLE_NETWORK=1 $STD corepack enable $STD corepack prepare pnpm@10.19.0 --activate -$STD pnpm install --frozen-lockfile --ignore-scripts +$STD pnpm install --frozen-lockfile $STD pnpm --filter "@papra/app-client..." run build $STD pnpm --filter "@papra/app-server..." run build msg_ok "Set up Papra" @@ -87,8 +83,9 @@ Type=simple User=root WorkingDirectory=/opt/papra/apps/papra-server EnvironmentFile=/opt/papra/.env -ExecStartPre=/usr/bin/pnpm --silent run migration:apply -ExecStart=/usr/bin/pnpm --silent run start +Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ExecStartPre=/usr/bin/corepack pnpm --silent run migration:apply +ExecStart=/usr/bin/corepack pnpm --silent run start Restart=on-failure RestartSec=10 @@ -97,6 +94,7 @@ WantedBy=multi-user.target EOF systemctl enable -q --now papra +echo "${RELEASE}" >/opt/Papra_version.txt msg_ok "Created and Started Papra Service" motd_ssh diff --git a/install/sportarr-install.sh b/install/sportarr-install.sh deleted file mode 100644 index c9cb4d78e..000000000 --- a/install/sportarr-install.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/Sportarr/Sportarr - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os -setup_hwaccel - -msg_info "Installing Dependencies" -$STD apt install -y \ - ffmpeg \ - gosu \ - sqlite3 -msg_ok "Installed Dependencies" - -fetch_and_deploy_gh_release "sportarr" "Sportarr/Sportarr" "prebuild" "latest" "/opt/sportarr" "Sportarr-linux-x64-*.tar.gz" - -msg_info "Setting up Sportarr" -cat </opt/sportarr/.env -Sportarr__DataPath="/opt/sportarr-data/config" -ASPNETCORE_URLS="http://*:1867" -ASPNETCORE_ENVIRONMENT="Production" -DOTNET_CLI_TELEMETRY_OPTOUT=1 -DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false -LIBVA_DRIVER_NAME=iHD -EOF -msg_ok "Setup Sportarr" - -msg_info "Creating Service" -cat </etc/systemd/system/sportarr.service -[Unit] -Description=Sportarr Service -After=network.target - -[Service] -EnvironmentFile=/opt/sportarr/.env -WorkingDirectory=/opt/sportarr -ExecStart=/opt/sportarr/Sportarr -Restart=always - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now sportarr -msg_info "Created Service" - -motd_ssh -customize -cleanup_lxc diff --git a/misc/tools.func b/misc/tools.func index f7c13fa7c..1a58ab825 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1759,8 +1759,13 @@ function fetch_and_deploy_gh_release() { if [[ "$mode" == "tarball" || "$mode" == "source" ]]; then # GitHub API's tarball_url/zipball_url can return HTTP 300 Multiple Choices # when a branch and tag share the same name. Use explicit refs/tags/ URL instead. - local direct_tarball_url="https://github.com/$repo/archive/refs/tags/$tag_name.tar.gz" - filename="${app_lc}-${version}.tar.gz" + # URL-encode the tag_name for special characters (e.g., @papra/docker@25.12.0) + local tag_encoded + tag_encoded=$(printf '%s' "$tag_name" | jq -sRr @uri) + local direct_tarball_url="https://github.com/$repo/archive/refs/tags/$tag_encoded.tar.gz" + # Sanitize version for filename (replace / with -) + local version_safe="${version//\//-}" + filename="${app_lc}-${version_safe}.tar.gz" curl $download_timeout -fsSL -o "$tmpdir/$filename" "$direct_tarball_url" || { msg_error "Download failed: $direct_tarball_url"