From bd0fea248abe2eaee3fd6131e5db3054d783ee5c Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Wed, 10 Aug 2022 16:49:52 +0200 Subject: [PATCH] Fix: increase swap & add node_option --max-old-space-size --- scripts/_common.sh | 4 ++-- scripts/install | 6 ++---- scripts/upgrade | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b515998..ef0c347 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,8 +5,8 @@ #================================================= NODEJS_VERSION="16" -swap_needed=2048 -node_max_old_space_size=6144 +swap_needed=4096 +node_max_old_space_size=4096 # dependencies used by the app pkg_dependencies="" diff --git a/scripts/install b/scripts/install index 68c9b82..1ee912d 100755 --- a/scripts/install +++ b/scripts/install @@ -198,10 +198,8 @@ ynh_script_progression --message="Installing Standard Notes - Syncing Server..." ynh_use_nodejs pushd "$final_path/live" - #ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --pure-lockfile - #ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build - ynh_exec_warn_less ynh_exec_as $app PATH=$ynh_node_load_PATH yarn install --immutable - ynh_exec_warn_less ynh_exec_as $app PATH=$ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --immutable + ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 715d27e..167c099 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -343,10 +343,8 @@ then ynh_script_progression --message="Installing Standard Notes - Syncing Server..." --weight=93 ynh_use_nodejs pushd "$final_path/live" - #ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --pure-lockfile - #ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build - ynh_exec_warn_less ynh_exec_as $app PATH=$ynh_node_load_PATH yarn install --immutable - ynh_exec_warn_less ynh_exec_as $app PATH=$ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --immutable + ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build popd fi