From 67d262d2a7aced397571c69bf37a6cf6f8f2df6f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Sep 2021 10:11:24 +0200 Subject: [PATCH 1/2] Update manifest.json --- manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 7ae26a3..f424913 100644 --- a/manifest.json +++ b/manifest.json @@ -29,8 +29,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "is_public", From edb56182a42128a87663546ea8016aef5e9eabdc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Sep 2021 10:14:22 +0200 Subject: [PATCH 2/2] Remove redis install --- conf/app.src | 1 - scripts/_common.sh | 8 -------- scripts/change_url | 2 +- scripts/install | 2 -- scripts/remove | 3 --- scripts/restore | 3 --- scripts/upgrade | 15 ++++----------- 7 files changed, 5 insertions(+), 29 deletions(-) diff --git a/conf/app.src b/conf/app.src index 288e2cb..d7f8169 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=6b4e072f23325edd47666bdc6edf0e428c5e4ced22d8a5d3ffa9ca12be63b7cb SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/scripts/_common.sh b/scripts/_common.sh index 77741ea..afb7110 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,14 +4,8 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -#pkg_dependencies="redis-server" - nodejs_version=15 -# dependencies used by the app -pkg_dependencies="redis-server" - #================================================= # PERSONAL HELPERS #================================================= @@ -24,8 +18,6 @@ pkg_dependencies="redis-server" # FUTURE OFFICIAL HELPERS #================================================= -#!/bin/bash - # get the first available redis database # # usage: ynh_redis_get_free_db diff --git a/scripts/change_url b/scripts/change_url index 4480004..bcde61e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -121,7 +121,7 @@ chown $app:$app "$final_path/server/config.js" ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #--line_match="HTTP Server listening" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 4e7e32e..87d574d 100644 --- a/scripts/install +++ b/scripts/install @@ -64,8 +64,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=20 -ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version diff --git a/scripts/remove b/scripts/remove index 5506f14..7c05587 100644 --- a/scripts/remove +++ b/scripts/remove @@ -46,9 +46,6 @@ ynh_remove_systemd_config #================================================= ynh_script_progression --message="Removing dependencies..." --weight=1 -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - ynh_remove_nodejs #================================================= diff --git a/scripts/restore b/scripts/restore index 7d343fc..79d1941 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,9 +74,6 @@ chmod +x "$final_path/server/bin/prod.js" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version diff --git a/scripts/upgrade b/scripts/upgrade index 977ed44..45d92eb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,8 +103,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=18 -ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -118,16 +116,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=16 - #pushd "$final_path" - # ynh_use_nodejs - # ynh_exec_warn_less ynh_npm install - # ynh_exec_warn_less ynh_npm run build - #popd pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install - ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm run build -popd + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install + ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm run build + popd fi #=================================================