mirror of
https://github.com/YunoHost-Apps/snserver_ynh.git
synced 2024-09-03 20:26:22 +02:00
Reduce installation
This commit is contained in:
parent
a49dde4c70
commit
9ebb68a1df
4 changed files with 5 additions and 27 deletions
|
@ -9,7 +9,7 @@ After=__APP__-auth.service
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/live/auth-worker
|
WorkingDirectory=__FINALPATH__/live/auth
|
||||||
EnvironmentFile=__FINALPATH__/live/auth-worker.env
|
EnvironmentFile=__FINALPATH__/live/auth-worker.env
|
||||||
ExecStart=/usr/bin/yarn worker
|
ExecStart=/usr/bin/yarn worker
|
||||||
StandardOutput=append:/var/log/__APP__/auth-worker.log
|
StandardOutput=append:/var/log/__APP__/auth-worker.log
|
||||||
|
|
|
@ -9,7 +9,7 @@ After=__APP__-syncing-server-js.service
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/live/syncing-server-js-worker
|
WorkingDirectory=__FINALPATH__/live/syncing-server-js
|
||||||
EnvironmentFile=__FINALPATH__/live/syncing-server-js-worker.env
|
EnvironmentFile=__FINALPATH__/live/syncing-server-js-worker.env
|
||||||
ExecStart=/usr/bin/yarn worker
|
ExecStart=/usr/bin/yarn worker
|
||||||
StandardOutput=append:/var/log/__APP__/syncing-server-js-worker.log
|
StandardOutput=append:/var/log/__APP__/syncing-server-js-worker.log
|
||||||
|
|
|
@ -202,27 +202,17 @@ ynh_script_progression --message="Installing Standard Notes - Syncing Server..."
|
||||||
|
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
pushd "$final_path/live/syncing-server-js"
|
pushd "$final_path/live/syncing-server-js"
|
||||||
ynh_print_info "Installing ... [1/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/syncing-server-js-worker"
|
|
||||||
ynh_print_info "Installing ... [2/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 install --pure-lockfile
|
||||||
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
||||||
popd
|
popd
|
||||||
pushd "$final_path/live/auth"
|
pushd "$final_path/live/auth"
|
||||||
ynh_print_info "Installing ... [3/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/auth-worker"
|
|
||||||
ynh_print_info "Installing ... [4/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 install --pure-lockfile
|
||||||
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
||||||
popd
|
popd
|
||||||
pushd "$final_path/live/api-gateway"
|
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 install --pure-lockfile
|
||||||
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -264,13 +264,11 @@ then
|
||||||
ynh_backup_if_checksum_is_different --file=$config_syncing_server_js_worker
|
ynh_backup_if_checksum_is_different --file=$config_syncing_server_js_worker
|
||||||
# Remove destination directory
|
# Remove destination directory
|
||||||
ynh_secure_remove --file="$final_path/live/syncing_server_js"
|
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"
|
||||||
ynh_secure_remove --file="$config_syncing_server_js_worker"
|
ynh_secure_remove --file="$config_syncing_server_js_worker"
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
mkdir -p "$final_path/live"
|
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"
|
||||||
ynh_setup_source --source_id=app_syncing-server-js --dest_dir="$final_path/live/syncing-server-js-worker"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$auth_version_installed" < "$auth_version" ]]
|
if [[ "$auth_version_installed" < "$auth_version" ]]
|
||||||
|
@ -280,13 +278,11 @@ then
|
||||||
ynh_backup_if_checksum_is_different --file=$config_auth_worker
|
ynh_backup_if_checksum_is_different --file=$config_auth_worker
|
||||||
# Remove destination directory
|
# Remove destination directory
|
||||||
ynh_secure_remove --file="$final_path/live/auth"
|
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"
|
||||||
ynh_secure_remove --file="$config_auth_worker"
|
ynh_secure_remove --file="$config_auth_worker"
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
mkdir -p "$final_path/live"
|
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"
|
||||||
ynh_setup_source --source_id=app_auth --dest_dir="$final_path/live/auth-worker"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$api_gateway_version_installed" < "$api_gateway_version" ]]
|
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 install --pure-lockfile
|
||||||
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
||||||
popd
|
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
|
ynh_app_setting_set --app=$app --key=syncing_server_js_version --value=$syncing_server_js_version
|
||||||
fi
|
fi
|
||||||
if [[ "$auth_version_installed" < "$auth_version" ]]
|
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 install --pure-lockfile
|
||||||
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
ynh_exec_as $app env PATH=$ynh_node_load_PATH yarn build
|
||||||
popd
|
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
|
ynh_app_setting_set --app=$app --key=auth_version --value=$auth_version
|
||||||
fi
|
fi
|
||||||
if [[ "$api_gateway_version_installed" < "$api_gateway_version" ]]
|
if [[ "$api_gateway_version_installed" < "$api_gateway_version" ]]
|
||||||
|
|
Loading…
Reference in a new issue