From 5e78d293e6ffba3908fffe9672dfa88035c2f4d0 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sat, 31 Oct 2026 21:44:15 +0100 Subject: [PATCH] Aurral: build the pnpm workspace and run backend/server.ts (#18340) * Aurral: build the pnpm workspace and run backend/server.ts v2.12.0 moved from npm workspaces to pnpm and the backend entry to server.ts, so npm ci --workspace frontend found no workspace. Updates point existing units at server.ts. * Aurral: install only the frontend and backend packages The workspace root's prepare script runs vp config, which needs git; the upstream image filters the install to the two packages as well. * Aurral: install git for the workspace prepare script The root prepare script runs vp config, which aborts when git is missing and only notes the absent .git directory otherwise. --- ct/aurral.sh | 13 ++++++------- install/aurral-install.sh | 13 +++++-------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/ct/aurral.sh b/ct/aurral.sh index 5006cffa6..572b39df7 100644 --- a/ct/aurral.sh +++ b/ct/aurral.sh @@ -37,19 +37,16 @@ function update_script() { msg_ok "Stopped Service" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "aurral" "lklynet/aurral" "tarball" - NODE_VERSION="26" setup_nodejs + NODE_VERSION="26" NODE_MODULE="pnpm" setup_nodejs + ensure_dependencies git msg_info "Updating Aurral" cd /opt/aurral export VITE_APP_VERSION="$(cat ~/.aurral)" export VITE_GITHUB_REPO="lklynet/aurral" export VITE_RELEASE_CHANNEL="stable" - # aurral's .npmrc sets engine-strict=true and pins an exact node patch (e.g. 26.8.x), - # which NodeSource can't match since it only ships the latest patch per major. - export npm_config_engine_strict=false - $STD npm ci --workspace frontend --include-workspace-root=false - $STD npm run build --workspace frontend - $STD npm ci --workspace backend --omit=dev --include=optional --include-workspace-root=false + $STD pnpm install --frozen-lockfile --config.engine-strict=false --filter aurral-frontend --filter aurral-backend + $STD pnpm --filter aurral-frontend run build mkdir -p /opt/aurral_data cat </opt/aurral/aurral.env NODE_ENV=production @@ -57,6 +54,8 @@ PORT=3001 AURRAL_DATA_DIR=/opt/aurral_data APP_VERSION=$(cat ~/.aurral) EOF + sed -i 's#backend/server.js#backend/server.ts#' /etc/systemd/system/aurral.service + systemctl daemon-reload msg_ok "Updated Aurral" msg_info "Starting Service" diff --git a/install/aurral-install.sh b/install/aurral-install.sh index b780ef627..1f23e494e 100644 --- a/install/aurral-install.sh +++ b/install/aurral-install.sh @@ -16,13 +16,14 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ build-essential \ + git \ python3 \ ffmpeg \ fontconfig \ fonts-dejavu-core msg_ok "Installed Dependencies" -NODE_VERSION="26" setup_nodejs +NODE_VERSION="26" NODE_MODULE="pnpm" setup_nodejs fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp" fetch_and_deploy_gh_release "aurral" "lklynet/aurral" "tarball" @@ -32,12 +33,8 @@ cd /opt/aurral export VITE_APP_VERSION="$(cat ~/.aurral)" export VITE_GITHUB_REPO="lklynet/aurral" export VITE_RELEASE_CHANNEL="stable" -# aurral's .npmrc sets engine-strict=true and pins an exact node patch (e.g. 26.8.x), -# which NodeSource can't match since it only ships the latest patch per major. -export npm_config_engine_strict=false -$STD npm ci --workspace frontend --include-workspace-root=false -$STD npm run build --workspace frontend -$STD npm ci --workspace backend --omit=dev --include=optional --include-workspace-root=false +$STD pnpm install --frozen-lockfile --config.engine-strict=false --filter aurral-frontend --filter aurral-backend +$STD pnpm --filter aurral-frontend run build msg_ok "Built Aurral" msg_info "Creating Service" @@ -58,7 +55,7 @@ Type=simple User=root WorkingDirectory=/opt/aurral EnvironmentFile=/opt/aurral/aurral.env -ExecStart=/usr/bin/node backend/server.js +ExecStart=/usr/bin/node backend/server.ts Restart=on-failure RestartSec=5