Reactive Resume: use new release parsing; other fixes (#6744)

This commit is contained in:
Chris 2025-08-11 07:23:29 -04:00 committed by GitHub
parent 27b79a23b6
commit f7ca7b28df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 10 deletions

View File

@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="Reactive-Resume" APP="Reactive-Resume"
var_tags="${var_tags:-documents}" var_tags="${var_tags:-documents}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-3072}" var_ram="${var_ram:-4096}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-12}"
@ -28,15 +28,16 @@ function update_script() {
msg_error "No $APP Installation Found!" msg_error "No $APP Installation Found!"
exit exit
fi fi
RELEASE=$(curl -fsSL https://api.github.com/repos/lazy-media/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -fsSL https://api.github.com/repos/lazy-media/Reactive-Resume/releases/latest | jq -r '.tag_name' | sed 's/^v//')
if [[ ! -f "$HOME"/.reactive-resume ]] || [[ "$RELEASE" != "$(cat "$HOME"/.reactive-resume)" ]]; then if [[ ! -f "$HOME"/.reactive-resume ]] || [[ "$RELEASE" != "$(cat "$HOME"/.reactive-resume)" ]]; then
msg_info "Stopping services" msg_info "Stopping services"
systemctl stop Reactive-Resume systemctl stop Reactive-Resume
msg_ok "Stopped services" msg_ok "Stopped services"
cp /opt/"$APP"/.env /opt/rxresume.env cp /opt/"$APP"/.env /opt/rxresume.env
rm -rf /opt/"$APP"
fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume" fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume" "tarball" "latest" "/opt/Reactive-Resume"
msg_info "Updating $APP to v${RELEASE}" msg_info "Updating $APP to v${RELEASE}"
cd /opt/"$APP" cd /opt/"$APP"
export PUPPETEER_SKIP_DOWNLOAD="true" export PUPPETEER_SKIP_DOWNLOAD="true"
@ -84,9 +85,9 @@ function update_script() {
rm -f "$brwsr_tmp" rm -f "$brwsr_tmp"
msg_ok "Cleanup Completed" msg_ok "Cleanup Completed"
msg_ok "Update Successful" msg_ok "Updated Successfully"
else else
msg_ok "No update required. $APP is already at v{$RELEASE}" msg_ok "No update required. $APP is already at v${RELEASE}"
fi fi
exit exit
} }

View File

@ -20,7 +20,7 @@
"script": "ct/reactive-resume.sh", "script": "ct/reactive-resume.sh",
"resources": { "resources": {
"cpu": 2, "cpu": 2,
"ram": 3072, "ram": 4096,
"hdd": 8, "hdd": 8,
"os": "Debian", "os": "Debian",
"version": "12" "version": "12"

View File

@ -19,7 +19,7 @@ curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio
$STD dpkg -i minio.deb $STD dpkg -i minio.deb
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
PG_VERSION="16" PG_MODULES="common" setup_postgresql PG_VERSION="16" setup_postgresql
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
msg_info "Setting up Database" msg_info "Setting up Database"
@ -32,7 +32,6 @@ $STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" $STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
msg_ok "Set up Database" msg_ok "Set up Database"
msg_info "Installing $APPLICATION"
MINIO_PASS=$(openssl rand -base64 48) MINIO_PASS=$(openssl rand -base64 48)
ACCESS_TOKEN=$(openssl rand -base64 48) ACCESS_TOKEN=$(openssl rand -base64 48)
REFRESH_TOKEN=$(openssl rand -base64 48) REFRESH_TOKEN=$(openssl rand -base64 48)
@ -41,6 +40,8 @@ LOCAL_IP=$(hostname -I | awk '{print $1}')
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume" fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume"
msg_info "Installing $APPLICATION"
cd /opt/"$APPLICATION" cd /opt/"$APPLICATION"
export CI="true" export CI="true"
export PUPPETEER_SKIP_DOWNLOAD="true" export PUPPETEER_SKIP_DOWNLOAD="true"
@ -48,7 +49,6 @@ export NODE_ENV="production"
export NEXT_TELEMETRY_DISABLED=1 export NEXT_TELEMETRY_DISABLED=1
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile
$STD pnpm run build $STD pnpm run build
$STD pnpm install --prod --frozen-lockfile
$STD pnpm run prisma:generate $STD pnpm run prisma:generate
msg_ok "Installed $APPLICATION" msg_ok "Installed $APPLICATION"