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

Merge pull request #36 from Limezy/remove-warnings

Remove warnings + Adapt install to MinIO & Dex changes + Change licence to go into the official catalog
This commit is contained in:
Limezy 2022-03-30 21:23:59 +07:00 committed by GitHub
commit 18b6a9079e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 51 additions and 21 deletions

View file

@ -33,8 +33,8 @@ COLLABORATION_URL=
# A more detailed guide on setting up S3 is available here:
# => https://wiki.generaloutline.com/share/125de1cc-9ff6-424b-8415-0d58c809a40f
#
AWS_ACCESS_KEY_ID=minio
AWS_SECRET_ACCESS_KEY=__MINIO_KEY__
AWS_ACCESS_KEY_ID=__MINIO_ADMIN__
AWS_SECRET_ACCESS_KEY=__MINIO_PASSWORD__
AWS_REGION=fr-ynh-1
AWS_S3_UPLOAD_BUCKET_URL=https://__MINIO_DOMAIN__
AWS_S3_UPLOAD_BUCKET_NAME=outlinestorage

View file

@ -1,9 +1,15 @@
### Not totally free licence
Outline is a softwared licenced under [BUSL 1.1 licence](https://spdx.org/licenses/BUSL-1.1.html).
⚠️ That licence **is not totally free**. Please read it very carefully if you have any commercial use in mind.
The Outline version shipped with this package (v0.62.0) will be released under Apache-2.0 licence [after March 1st 2026](https://github.com/outline/outline/blob/7216551164536e8abddfabc95b785ef5f8d51de7/LICENSE).
### Known limitations
1. Because this app can't yet run in the CI server, its integration level is unkonwn at the moment and standard Yunohost packages testing couldn't run yet. **Please don't use it on a prod server**
2. The app requires MinIO app to be installed (MinIO installation is automatic, though)
1. Because this app can't yet run in the CI server, its integration level is unkonwn at the moment and standard Yunohost packages testing couldn't run yet. **Please don't use it yet on a prod server**
2. The app requires MinIO app to be installed (MinIO installation and setup is automatic, though)
3. The app requires Dex app to be installed (Dex installation and setup is automatic, though)
3. The app is requiring three domains including two fully dedicated (one for MinIO server, one for Dex, one for Outline)
4. ARM architectures are not supported (and may never be as Outline was built for AMD64)
4. ARM architectures are not yet supported (But it should be achievable)
6. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly

View file

@ -9,7 +9,7 @@
"version": "0.62.0~ynh1",
"url": "www.getoutline.com",
"upstream": {
"license": "BSL 1.1",
"license": "BUSL-1.1",
"website": "www.getoutline.com",
"demo": "https://app.getoutline.com/create",
"admindoc": "https://www.getoutline.com/developers",
@ -66,7 +66,18 @@
"name": "minio_domain",
"type": "domain",
"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)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
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)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
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)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
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)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
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
ynh_die "The domain provided for MinIO is already used by another app. Please chose another one !"
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
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)
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
@ -78,9 +80,9 @@ fi
yunohost app install https://github.com/YunoHost-Apps/dex_ynh --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
#=================================================
#===================================================
ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/opt/yunohost/$app
@ -190,15 +192,15 @@ ynh_add_nginx_config
pushd "$final_path"
ynh_use_nodejs
ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile 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
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=18
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1
ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile 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
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
popd
#=================================================

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)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
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)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)
@ -118,4 +120,5 @@ ynh_system_user_delete --username=$app
#=================================================
ynh_script_progression --message="If you don't need it anymore, don't forget to remove the MinIO app !"
ynh_script_progression --message="If you don't need it anymore, don't forget to remove the Dex app !"
ynh_script_progression --message="Removal of $app completed" --time --last

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)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
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)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
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)
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
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)
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)
@ -115,15 +117,15 @@ ynh_script_progression --message="Building Yarn dependencies... This can be very
pushd "$final_path"
ynh_use_nodejs
ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --time --weight=5
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile 2>&1
ynh_script_progression --message="Cleaning cache... " --time --weight=1
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --time --weight=5
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1
ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --time --weight=5
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile 2>&1
ynh_script_progression --message="Cleaning cache... " --time --weight=1
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
popd
#=================================================