Compare commits

...

3 Commits

Author SHA1 Message Date
CanbiZ
c17f7926f8 Enhance nginx proxy manager install script
Refactor installation script to support different OS versions and streamline Node.js installation.
2025-10-16 15:02:07 +02:00
community-scripts-pr-app[bot]
ca2c708ad6 Update CHANGELOG.md (#8398)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-16 12:45:52 +00:00
CanbiZ
b46820966e paperless-ngx: remove unneeded deps, use static ghostscript (#8397) 2025-10-16 14:45:27 +02:00
3 changed files with 26 additions and 49 deletions

View File

@@ -16,6 +16,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- paperless-ngx: remove unneeded deps, use static ghostscript [@MickLesk](https://github.com/MickLesk) ([#8397](https://github.com/community-scripts/ProxmoxVE/pull/8397))
- UmlautAdaptarr: Revert back to bookworm repo [@tremor021](https://github.com/tremor021) ([#8392](https://github.com/community-scripts/ProxmoxVE/pull/8392))
## 2025-10-15

View File

@@ -13,6 +13,8 @@ setting_up_container
network_check
update_os
setup_go
msg_info "Installing Dependencies"
$STD apt update
$STD apt -y install \
@@ -33,48 +35,38 @@ $STD apt install -y \
python3-certbot \
python3-certbot-dns-cloudflare
$STD pip3 install --break-system-packages certbot-dns-multi
$STD python3 -m venv /opt/certbot/
msg_ok "Installed Python Dependencies"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
msg_info "Installing Openresty"
curl -fsSL "https://openresty.org/package/pubkey.gpg" | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg
echo -e "deb http://openresty.org/package/debian bullseye openresty" >/etc/apt/sources.list.d/openresty.list
case "$VERSION" in
trixie)
echo -e "deb http://openresty.org/package/debian bookworm openresty" >/etc/apt/sources.list.d/openresty.list
;;
*)
echo -e "deb http://openresty.org/package/debian $VERSION openresty" >/etc/apt/sources.list.d/openresty.list
;;
esac
$STD apt update
$STD apt -y install openresty
msg_ok "Installed Openresty"
msg_info "Installing Node.js"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh)
source ~/.bashrc
$STD nvm install 16.20.2
ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node
msg_ok "Installed Node.js"
msg_info "Installing pnpm"
$STD npm install -g pnpm@8.15
msg_ok "Installed pnpm"
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
grep "tag_name" |
awk '{print substr($2, 3, length($2)-4) }')
read -r -p "${TAB3}Would you like to install an older version (v2.10.4)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Downloading Nginx Proxy Manager v2.10.4"
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.4" | tar -xz
cd ./nginx-proxy-manager-2.10.4
msg_ok "Downloaded Nginx Proxy Manager v2.10.4"
else
msg_info "Downloading Nginx Proxy Manager v${RELEASE}"
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
cd ./nginx-proxy-manager-"${RELEASE}"
msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
fi
msg_info "Downloading Nginx Proxy Manager v${RELEASE}"
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
cd ./nginx-proxy-manager-"${RELEASE}"
msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
msg_info "Setting up Environment"
ln -sf /usr/bin/python3 /usr/bin/python
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
ln -sf /usr/bin/certbot /usr/local/bin/certbot
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
ln -sf /usr/local/openresty/nginx/ /etc/nginx
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
@@ -185,7 +177,6 @@ customize
msg_info "Starting Services"
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg
systemctl enable -q --now openresty
systemctl enable -q --now npm
msg_ok "Started Services"

View File

@@ -22,7 +22,7 @@ $STD apt install -y \
optipng \
libpq-dev \
libmagic-dev \
libzbar0 \
libzbar0t64 \
poppler-utils \
default-libmysqlclient-dev \
automake \
@@ -30,17 +30,7 @@ $STD apt install -y \
pkg-config \
libtiff-dev \
libpng-dev \
libleptonica-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" setup_postgresql
PYTHON_VERSION="3.13" setup_uv
fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
setup_gs
msg_info "Installing OCR Dependencies (Patience)"
$STD apt install -y \
libleptonica-dev \
unpaper \
icc-profiles-free \
qpdf \
@@ -49,18 +39,13 @@ $STD apt install -y \
pngquant \
zlib1g \
tesseract-ocr \
tesseract-ocr-eng
msg_ok "Installed OCR Dependencies"
tesseract-ocr-eng \
ghostscript
msg_ok "Installed Dependencies"
msg_info "Setup JBIG2"
cd /opt/jbig2enc
$STD bash ./autogen.sh
$STD bash ./configure
$STD make
$STD make install
cd /
rm -rf /opt/jbig2enc
msg_ok "Installed JBIG2"
PG_VERSION="16" setup_postgresql
PYTHON_VERSION="3.13" setup_uv
fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
msg_info "Setting up PostgreSQL database"
DB_NAME=paperlessdb