From 9ebb68a1df689fd3aacd1f61132008394c440228 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Fri, 9 Jul 2021 13:12:39 +0200 Subject: [PATCH] Reduce installation --- conf/systemd_auth-worker.service | 2 +- conf/systemd_syncing-server-js-worker.service | 2 +- scripts/install | 16 +++------------- scripts/upgrade | 12 ------------ 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/conf/systemd_auth-worker.service b/conf/systemd_auth-worker.service index bfa3184..ce30ade 100644 --- a/conf/systemd_auth-worker.service +++ b/conf/systemd_auth-worker.service @@ -9,7 +9,7 @@ After=__APP__-auth.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/live/auth-worker +WorkingDirectory=__FINALPATH__/live/auth EnvironmentFile=__FINALPATH__/live/auth-worker.env ExecStart=/usr/bin/yarn worker StandardOutput=append:/var/log/__APP__/auth-worker.log diff --git a/conf/systemd_syncing-server-js-worker.service b/conf/systemd_syncing-server-js-worker.service index ba78537..8209f96 100644 --- a/conf/systemd_syncing-server-js-worker.service +++ b/conf/systemd_syncing-server-js-worker.service @@ -9,7 +9,7 @@ After=__APP__-syncing-server-js.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/live/syncing-server-js-worker +WorkingDirectory=__FINALPATH__/live/syncing-server-js EnvironmentFile=__FINALPATH__/live/syncing-server-js-worker.env ExecStart=/usr/bin/yarn worker StandardOutput=append:/var/log/__APP__/syncing-server-js-worker.log diff --git a/scripts/install b/scripts/install index c1c136f..3022748 100755 --- a/scripts/install +++ b/scripts/install @@ -202,27 +202,17 @@ ynh_script_progression --message="Installing Standard Notes - Syncing Server..." ynh_use_nodejs pushd "$final_path/live/syncing-server-js" - ynh_print_info "Installing ... [1/5]" - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build -popd -pushd "$final_path/live/syncing-server-js-worker" - ynh_print_info "Installing ... [2/5]" + ynh_print_info "Installing ... [1/3]" ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build popd pushd "$final_path/live/auth" - ynh_print_info "Installing ... [3/5]" - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build -popd -pushd "$final_path/live/auth-worker" - ynh_print_info "Installing ... [4/5]" + ynh_print_info "Installing ... [2/3]" ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build popd pushd "$final_path/live/api-gateway" - ynh_print_info "Installing ... [5/5]" + ynh_print_info "Installing ... [3/3]" ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build popd diff --git a/scripts/upgrade b/scripts/upgrade index bd2d37f..a947646 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -264,13 +264,11 @@ then ynh_backup_if_checksum_is_different --file=$config_syncing_server_js_worker # Remove destination directory ynh_secure_remove --file="$final_path/live/syncing_server_js" - ynh_secure_remove --file="$final_path/live/syncing_server_js_worker" ynh_secure_remove --file="$config_syncing_server_js" ynh_secure_remove --file="$config_syncing_server_js_worker" # Download, check integrity, uncompress and patch the source from app.src mkdir -p "$final_path/live" ynh_setup_source --source_id=app_syncing-server-js --dest_dir="$final_path/live/syncing-server-js" - ynh_setup_source --source_id=app_syncing-server-js --dest_dir="$final_path/live/syncing-server-js-worker" fi if [[ "$auth_version_installed" < "$auth_version" ]] @@ -280,13 +278,11 @@ then ynh_backup_if_checksum_is_different --file=$config_auth_worker # Remove destination directory ynh_secure_remove --file="$final_path/live/auth" - ynh_secure_remove --file="$final_path/live/auth_worker" ynh_secure_remove --file="$config_auth" ynh_secure_remove --file="$config_auth_worker" # Download, check integrity, uncompress and patch the source from app.src mkdir -p "$final_path/live" ynh_setup_source --source_id=app_auth --dest_dir="$final_path/live/auth" - ynh_setup_source --source_id=app_auth --dest_dir="$final_path/live/auth-worker" fi if [[ "$api_gateway_version_installed" < "$api_gateway_version" ]] @@ -372,10 +368,6 @@ then ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build popd - pushd "$final_path/live/syncing-server-js-worker" - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build - popd ynh_app_setting_set --app=$app --key=syncing_server_js_version --value=$syncing_server_js_version fi if [[ "$auth_version_installed" < "$auth_version" ]] @@ -384,10 +376,6 @@ then ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build popd - pushd "$final_path/live/auth-worker" - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn install --pure-lockfile - ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build - popd ynh_app_setting_set --app=$app --key=auth_version --value=$auth_version fi if [[ "$api_gateway_version_installed" < "$api_gateway_version" ]]