From a159959c6448b289ef39860b64bdab2e588f9110 Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 15 Nov 2021 00:05:32 +0700 Subject: [PATCH] Path_url --- conf/.env | 2 +- conf/nginx.conf | 2 +- scripts/install | 19 ++++++------------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/conf/.env b/conf/.env index a2db8bf..6dd32c1 100644 --- a/conf/.env +++ b/conf/.env @@ -26,7 +26,7 @@ REDIS_URL=redis://localhost:6379 # URL should point to the fully qualified, publicly accessible URL. If using a # proxy the port in URL and PORT may be different. -URL=https://__DOMAIN__/__PATH__ +URL=https://__DOMAIN__/__PATH_URL__ PORT=__PORT__ # See [documentation](docs/SERVICES.md) on running a separate collaboration diff --git a/conf/nginx.conf b/conf/nginx.conf index f34c768..89158c2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -location __PATH__/ { +location __PATH_URL__/ { # Force usage of https if ($scheme = http) { diff --git a/scripts/install b/scripts/install index 8603313..5b9f42c 100755 --- a/scripts/install +++ b/scripts/install @@ -68,7 +68,7 @@ mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --time --weight=1 +ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -79,7 +79,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --time --weight=1 +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -94,7 +94,7 @@ ynh_app_setting_set --app=$app --key=slack_secret --value=$slack_secret #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --time --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=2410) @@ -103,14 +103,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --time --weight=1 - -### SHOULD HAVE A CHECK FOR MINIO + INSTALLATION HERE -#if ! ynh_package_is_installed --package="minio" -#then -# yunohost tools update -# yunohost app install minio --force -#fi +ynh_script_progression --message="Installing dependencies..." --weight=1 # Install nodejs ynh_install_nodejs --nodejs_version=$NODEJS_VERSION @@ -123,7 +116,7 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --time --weight=1 +ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user ynh_system_user_create --username=$app --home_dir="$final_path" @@ -131,7 +124,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # CREATE A POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." --time --weight=1 +ynh_script_progression --message="Creating a PostgreSQL database..." --weight=1 db_name=$(ynh_sanitize_dbid --db_name=$app) ynh_app_setting_set --app=$app --key=db_name --value=$db_name