1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Trying full install 🚀

This commit is contained in:
Limezy 2022-03-30 15:19:12 +07:00
parent a1cc57da8f
commit 143a849fbb
7 changed files with 28 additions and 5 deletions

View file

@ -66,7 +66,18 @@
"name": "minio_domain", "name": "minio_domain",
"type": "domain", "type": "domain",
"example": "docs.domain.tld", "example": "docs.domain.tld",
"ask": "Domain for Minio app, used for images and attachements storage. If not yet installed, it will automatically be. Minio has to be installed at the root" "ask": "Domain for MinIO app, used for images and attachements storage. If not yet installed, it will automatically be. Minio has to be installed at the root"
},
{
"name": "minio_admin",
"type": "user",
"ask": "Admin for MinIO app, used for images and attachements storage. Please note that if MinIO is already installed, that setting won't be used"
},
{
"name": "minio_password",
"type": "password",
"example": "docs.domain.tld",
"ask": "Domain for MinIO app, used for images and attachements storage. Please note that if MinIO is already installed, that setting won't be used"
} }
] ]
} }

View file

@ -37,6 +37,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key)
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)

View file

@ -36,6 +36,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key)
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)

View file

@ -54,15 +54,17 @@ if ! yunohost app list | grep -q "id: minio"; then
if yunohost app list | grep -q "$YNH_APP_ARG_MINIO_DOMAIN"; then if yunohost app list | grep -q "$YNH_APP_ARG_MINIO_DOMAIN"; then
ynh_die "The domain provided for MinIO is already used by another app. Please chose another one !" ynh_die "The domain provided for MinIO is already used by another app. Please chose another one !"
fi fi
yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$YNH_APP_ARG_MINIO_DOMAIN&is_public=true&language=en" yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$YNH_APP_ARG_MINIO_DOMAIN&is_public=true&admin=$YNH_APP_ARG_MINIO_ADMIN&password=$YNH_APP_ARG_MINIO_PASSWORD"
fi fi
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
#================================================= #=================================================
# CHECK IF MINIO IS INSTALLED, IF NOT INSTALL IT # INSTALL DEX APP FOR OAUTH2 / OIDC
#================================================= #=================================================
ynh_script_progression --message="Installing Dex..." --weight=18 ynh_script_progression --message="Installing Dex..." --weight=18
@ -78,9 +80,9 @@ fi
yunohost app install https://github.com/Limezy/dex_ynh/tree/trick-nginx --force --args "domain=$dex_domain&path=$dex_path&OIDC_name=$oidc_name&OIDC_secret=$oidc_secret&OIDC_callback=$oidc_callback" yunohost app install https://github.com/Limezy/dex_ynh/tree/trick-nginx --force --args "domain=$dex_domain&path=$dex_path&OIDC_name=$oidc_name&OIDC_secret=$oidc_secret&OIDC_callback=$oidc_callback"
#================================================= #===================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #===================================================
ynh_script_progression --message="Validating installation parameters..." --weight=1 ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/opt/yunohost/$app final_path=/opt/yunohost/$app

View file

@ -24,6 +24,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key)
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)

View file

@ -46,6 +46,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key)
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)

View file

@ -25,6 +25,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key)
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
minio_admin=$(ynh_app_setting_get --app="minio" --key=admin)
minio_password=$(ynh_app_setting_get --app="minio" --key=password)
minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)