From 736d7908b4f31095e7a7b92fc632b0f6fad05e83 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 01:20:45 +0200 Subject: RUBY_VERSION factorisation --- scripts/_common.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index 015c1e9..f39b966 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,6 +7,8 @@ # dependencies used by the app pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" +RUBY_VERSION="2.6.5" + #================================================= # PERSONAL HELPERS #================================================= -- cgit v1.2.3-70-g09d2 From b5556ae674f1ca35da8f5e1d5a8a8ce4e69bc580 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 01:24:16 +0200 Subject: BUNDLER_VERSION factorization --- scripts/_common.sh | 2 ++ scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index f39b966..bb0fe95 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,6 +9,8 @@ pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git RUBY_VERSION="2.6.5" +BUNDLER_VERSION="1.17.3" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 2e218c6..ab3aaa9 100644 --- a/scripts/install +++ b/scripts/install @@ -157,7 +157,7 @@ ynh_script_progression --message="Installing Ruby..." --weight=424 ynh_install_ruby --ruby_version=$RUBY_VERSION pushd "$final_path/live" gem update --system - gem install bundler:1.17.3 --no-document + gem install bundler:$BUNDLER_VERSION --no-document popd #================================================= diff --git a/scripts/restore b/scripts/restore index bd79e95..724afc3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -117,7 +117,7 @@ ynh_script_progression --message="Installing Ruby..." --weight=393 ynh_install_ruby --ruby_version=$RUBY_VERSION pushd "$final_path/live" gem update --system - gem install bundler:1.17.3 --no-document + gem install bundler:$BUNDLER_VERSION --no-document popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f34010b..149c2f5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -252,7 +252,7 @@ ynh_script_progression --message="Installing Ruby..." --weight=424 ynh_install_ruby --ruby_version=$RUBY_VERSION pushd "$final_path/live" gem update --system - gem install bundler:1.17.3 --no-document + gem install bundler:$BUNDLER_VERSION --no-document popd #================================================= -- cgit v1.2.3-70-g09d2 From aac5dadc34f4810b852f1836576272eb52e115a1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 18:44:16 +0200 Subject: $NODEJS_VERSION factorisation --- scripts/_common.sh | 2 ++ scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index bb0fe95..0c5fb0e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,6 +11,8 @@ RUBY_VERSION="2.6.5" BUNDLER_VERSION="1.17.3" +NODEJS_VERSION="10" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 510701f..8f4f223 100644 --- a/scripts/install +++ b/scripts/install @@ -80,7 +80,7 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream #================================================= ynh_script_progression --message="Installing dependencies..." --weight=86 -ynh_install_nodejs --nodejs_version="10" +ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" diff --git a/scripts/upgrade b/scripts/upgrade index ee97cde..da0e7bb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -213,7 +213,7 @@ ynh_add_nginx_config 'port_web port_stream' ynh_script_progression --message="Upgrading dependencies..." --weight=24 ynh_remove_nodejs -ynh_install_nodejs --nodejs_version="10" +ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -- cgit v1.2.3-70-g09d2 From c2f6661420069146b6ca6777b4acedd827863bf1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 20:26:36 +0200 Subject: increase nodejs version --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index 0c5fb0e..e0686b2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,7 +11,7 @@ RUBY_VERSION="2.6.5" BUNDLER_VERSION="1.17.3" -NODEJS_VERSION="10" +NODEJS_VERSION="12" #================================================= # PERSONAL HELPERS -- cgit v1.2.3-70-g09d2 From f2051e67a3a7ee03254677434a35209beff2225b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 26 May 2020 13:19:50 +0200 Subject: $MEMORY_NEEDED factorisation --- scripts/_common.sh | 2 ++ scripts/install | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index e0686b2..dc466ba 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,6 +13,8 @@ BUNDLER_VERSION="1.17.3" NODEJS_VERSION="12" +MEMORY_NEEDED="2560" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 97dee20..8c63cde 100644 --- a/scripts/install +++ b/scripts/install @@ -136,9 +136,9 @@ ynh_script_progression --message="Adding swap is needed..." --weight=4 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt 2560 ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 2.5Go of memory - swap_needed=$((2560 - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 diff --git a/scripts/restore b/scripts/restore index ed0b27d..ae64eaf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -89,9 +89,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=4 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt 2560 ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 8Go of memory - swap_needed=$((2560 - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 diff --git a/scripts/upgrade b/scripts/upgrade index 9e02c01..fd58f16 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -233,9 +233,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=7 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt 2560 ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 8Go of memory - swap_needed=$((2560 - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 -- cgit v1.2.3-70-g09d2 From 81ff2eef08d08086c6ff647c3c5e6cfe15525a30 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 29 May 2020 22:31:25 +0200 Subject: Backup to node 10 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index dc466ba..2cf8424 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,7 +11,7 @@ RUBY_VERSION="2.6.5" BUNDLER_VERSION="1.17.3" -NODEJS_VERSION="12" +NODEJS_VERSION="10" MEMORY_NEEDED="2560" -- cgit v1.2.3-70-g09d2