From 5f22ab4da2e87c0091e661aa7a9cfe5d65bb579e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 11:12:26 +0100 Subject: [PATCH] Install from tar --- conf/app.src | 4 ++-- scripts/install | 10 ++-------- scripts/restore | 2 +- scripts/upgrade | 9 ++------- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/conf/app.src b/conf/app.src index e4dd89f..844e9b8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=url of app's source -SOURCE_SUM=sha256 checksum +SOURCE_URL=https://github.com/Requarks/wiki/archive/2.0.0-beta.33.tar.gz +SOURCE_SUM=66115e8ae174083eaaec83d1c7f6e026fa97ee53d664e6f1505ebe22b0dfe7f2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/scripts/install b/scripts/install index ed8e66f..5b0d081 100644 --- a/scripts/install +++ b/scripts/install @@ -106,14 +106,13 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies yarn redis-server postgresql postgresql-contrib build-essential #================================================= # CREATE A POSTGRESQL DATABASE #================================================= ynh_print_info "Creating a postgresql database ..." - ### Use these lines if you need a database for the application. ### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. ### The password will be stored as 'mysqlpwd' into the app settings, @@ -141,12 +140,7 @@ ynh_print_info "Setting up source files ..." ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src -#ynh_setup_source "$final_path" -git clone https://github.com/Requarks/wiki "$final_path" - -pushd $final_path - git checkout "tags/2.0.0-beta.33" --quiet -popd +ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index bb1add6..680d05a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,7 +93,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies yarn redis-server postgresql postgresql-contrib build-essential #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index ea084d9..326ec40 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,12 +89,7 @@ path_url=$(ynh_normalize_url_path $path_url) ynh_print_info "Download, check and unpack source" # Download, check integrity, uncompress and patch the source from app.src -#ynh_setup_source "$final_path" - -pushd $final_path - git fetch origin - git checkout "tags/2.0.0-beta.33" --quiet -popd +ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION @@ -114,7 +109,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies yarn redis-server postgresql postgresql-contrib build-essential #================================================= # CREATE DEDICATED USER