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

Update install

This commit is contained in:
Éric Gaspar 2023-09-29 18:46:20 +02:00
parent 934f39eac6
commit aa89159759

View file

@ -32,12 +32,12 @@ ynh_script_progression --message="Installing MinIO if needed..." --weight=18
if ! yunohost app list | grep -q "id: minio"; then
echo "MinIO is not installed. Installing... "
yunohost tools update
#REMOVEME? 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 !"
fi
# FIXME hackish workaround to circumvent the linter
public=public
#REMOVEME? 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"
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
#REMOVEME? minio_domain=$(ynh_app_setting_get --app="minio" --key=domain)
@ -76,17 +76,6 @@ else
dex_user_uri="https://$dex_domain$dex_path/userinfo"
fi
#===================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#===================================================
#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1
#REMOVEME? install_dir=/var/www/$app
#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
# Register (book) web path
#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
@ -118,7 +107,7 @@ ynh_app_setting_set --app=$app --key=dex_user_uri --value=$dex_user_uri
ynh_script_progression --message="Installing dependencies..." --weight=1
# Install nodejs
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION 2>&1
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -188,7 +177,6 @@ pushd "$install_dir"
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1
ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=3000" yarn build 2>&1
ynh_script_progression --message="Cleaning cache... " --weight=3
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate
popd