From 16b39faf287fe88264e3f108deec06b47401b6a4 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Mon, 24 Mar 2025 22:21:35 -0400 Subject: [PATCH] rxresume: Fixes rxresume: Use correct Minio download path rxresume: Fix case on service file check rxresume: Just be in the dir rxresume: another error fix rxresume: return env file after update rxresume: small readability tweaks rxresume: fix script name --- ct/{rxresume.sh => reactive-resume.sh} | 28 +++++++++++++++----------- install/reactive-resume-install.sh | 9 ++++----- 2 files changed, 20 insertions(+), 17 deletions(-) rename ct/{rxresume.sh => reactive-resume.sh} (86%) diff --git a/ct/rxresume.sh b/ct/reactive-resume.sh similarity index 86% rename from ct/rxresume.sh rename to ct/reactive-resume.sh index 17bbbae..cbe76c6 100644 --- a/ct/rxresume.sh +++ b/ct/reactive-resume.sh @@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="Reactive-Resume" var_tags="documents" var_cpu="2" -var_ram="2048" -var_disk="6" +var_ram="3072" +var_disk="8" var_os="debian" var_version="12" var_unprivileged="1" @@ -24,16 +24,16 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /etc/systemd/system/reactive-resume.service ]]; then + if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then msg_error "No ${APP} Installation Found!" exit fi RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping $APP" - systemctl stop reactive-resume - msg_ok "Stopped $APP" + msg_info "Stopping services" + systemctl stop Reactive-Resume + msg_ok "Stopped services" msg_info "Updating $APP to v${RELEASE}" cp /opt/${APP}/.env /opt/rxresume.env @@ -41,18 +41,21 @@ function update_script() { wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip cp -r ${APP}-${RELEASE}/* /opt/${APP} + cd /opt/${APP} corepack enable export PUPPETEER_SKIP_DOWNLOAD="true" export NEXT_TELEMETRY_DISABLED=1 export CI="true" - $STD pnpm install --frozen-lockfile --prefix /opt/${APP} - $STD pnpm run build --prefix /opt/${APP} - $STD pnpm run prisma:generate --prefix /opt/${APP} + $STD pnpm install --frozen-lockfile + $STD pnpm run build + $STD pnpm run prisma:generate + mv /opt/rxresume.env /opt/${APP}/.env msg_ok "Updated $APP to v${RELEASE}" msg_info "Updating Minio" systemctl stop minio - wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb + cd /tmp + wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb $STD dpkg -i minio.deb msg_ok "Updated Minio" @@ -76,14 +79,15 @@ function update_script() { msg_ok "Updated Browserless" msg_info "Starting services" - systemctl start minio reactive-resume browserless + systemctl start minio Reactive-Resume browserless msg_ok "Started services" msg_info "Cleaning Up" rm -f /tmp/minio.deb + rm -f /tmp/v${RELEASE}.zip + rm -f /tmp/v${TAG}.zip rm -rf /tmp/${APP}-${RELEASE} rm -rf /tmp/browserless-${TAG} - msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index d00a132..092e1ee 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -32,7 +32,7 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null $STD apt-get install -y postgresql-16 nodejs cd /tmp -wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb +wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb $STD dpkg -i minio.deb msg_info "Setting up Database" @@ -66,7 +66,7 @@ $STD pnpm run build $STD pnpm run prisma:generate msg_ok "Installed ${APPLICATION}" -msg_info "Installing Browserless" +msg_info "Installing Browserless (Patience)" cd /tmp $STD python3 -m pip install playwright wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip @@ -134,7 +134,7 @@ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt echo "Database Password: $DB_PASS" echo "Database Name: $DB_NAME" echo "Minio Root Password: ${MINIO_PASS}" -} >>~/$APP_NAME.creds +} >>~/${APPLICATION}.creds msg_ok "Configured applications" msg_info "Creating Services" @@ -179,12 +179,11 @@ WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service -msg_ok "Created Service" +msg_ok "Created Services" motd_ssh customize -# Cleanup msg_info "Cleaning up" rm -f /tmp/v${RELEASE}.zip rm -f /tmp/minio.deb