mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-27 23:30:40 +01:00
TREK: build 5.0 with 4 GB RAM and without dependency install scripts (#18194)
tsc on the 5.0 server needs about 3 GB of heap; the 2 GB default left it 2.3 GB and the update died in the build. npm ci runs with --ignore-scripts like upstream, so better-sqlite3 keeps its prebuilt binary instead of an addon built against the running Node's headers. kitinerary-extractor sits in libexec on Debian, so link it into PATH where TREK looks for it.
This commit is contained in:
committed by
GitHub
parent
6717059b8c
commit
ecf5376265
+4
-3
@@ -9,7 +9,7 @@ source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_
|
||||
APP="TREK"
|
||||
var_tags="${var_tags:-travel;planning;collaboration}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
@@ -43,6 +43,7 @@ function update_script() {
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
ensure_dependencies "libkitinerary-bin"
|
||||
ln -sf "$(find /usr/lib -name kitinerary-extractor -type f | head -1)" /usr/local/bin/kitinerary-extractor
|
||||
|
||||
create_backup /opt/trek/server/.env \
|
||||
/opt/trek/data \
|
||||
@@ -52,7 +53,7 @@ function update_script() {
|
||||
|
||||
msg_info "Building TREK"
|
||||
cd /opt/trek
|
||||
$STD npm ci
|
||||
$STD npm ci --ignore-scripts
|
||||
$STD npm run build --workspace=shared
|
||||
$STD npm run build --workspace=client
|
||||
$STD npm run build --workspace=server
|
||||
@@ -72,7 +73,7 @@ function update_script() {
|
||||
|
||||
rm -rf /opt/trek/node_modules
|
||||
cd /opt/trek
|
||||
$STD npm ci --workspace=server --omit=dev
|
||||
$STD npm ci --workspace=server --omit=dev --ignore-scripts
|
||||
msg_ok "Set up TREK Workspace"
|
||||
|
||||
if [[ "$MIGRATION" == "1" ]]; then
|
||||
|
||||
@@ -17,6 +17,7 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
libkitinerary-bin
|
||||
ln -sf "$(find /usr/lib -name kitinerary-extractor -type f | head -1)" /usr/local/bin/kitinerary-extractor
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
@@ -24,7 +25,7 @@ fetch_and_deploy_gh_release "trek" "liketrek/TREK" "tarball"
|
||||
|
||||
msg_info "Setup TREK"
|
||||
cd /opt/trek
|
||||
$STD npm ci
|
||||
$STD npm ci --ignore-scripts
|
||||
$STD npm run build --workspace=shared
|
||||
$STD npm run build --workspace=client
|
||||
$STD npm run build --workspace=server
|
||||
@@ -43,13 +44,16 @@ mkdir -p \
|
||||
/opt/trek/uploads/files \
|
||||
/opt/trek/uploads/covers \
|
||||
/opt/trek/uploads/avatars \
|
||||
/opt/trek/uploads/photos
|
||||
/opt/trek/uploads/photos \
|
||||
/opt/trek/uploads/journey \
|
||||
/opt/trek/uploads/places
|
||||
rm -rf /opt/trek/server/data
|
||||
rm -rf /opt/trek/server/uploads
|
||||
ln -s /opt/trek/data /opt/trek/server/data
|
||||
ln -s /opt/trek/uploads /opt/trek/server/uploads
|
||||
rm -rf /opt/trek/node_modules
|
||||
cd /opt/trek
|
||||
$STD npm prune --omit=dev
|
||||
$STD npm ci --workspace=server --omit=dev --ignore-scripts
|
||||
msg_ok "Set up TREK Workspace"
|
||||
|
||||
msg_info "Configuring TREK"
|
||||
|
||||
Reference in New Issue
Block a user