Files
ProxmoxVE/install/aurral-install.sh
T
CanbiZ (MickLesk) 5e78d293e6 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.
2026-10-31 21:44:15 +01:00

71 lines
1.6 KiB
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/lklynet/aurral
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
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" 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"
msg_info "Building Aurral"
cd /opt/aurral
export VITE_APP_VERSION="$(cat ~/.aurral)"
export VITE_GITHUB_REPO="lklynet/aurral"
export VITE_RELEASE_CHANNEL="stable"
$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"
mkdir -p /opt/aurral_data
cat <<EOF >/opt/aurral/aurral.env
NODE_ENV=production
PORT=3001
AURRAL_DATA_DIR=/opt/aurral_data
APP_VERSION=$(cat ~/.aurral)
EOF
cat <<EOF >/etc/systemd/system/aurral.service
[Unit]
Description=Aurral Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/aurral
EnvironmentFile=/opt/aurral/aurral.env
ExecStart=/usr/bin/node backend/server.ts
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now aurral
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc