From e2466fa0d41ebb0d81e1a2823fb45295e852d789 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 25 Mar 2022 08:37:40 +0700 Subject: [PATCH 1/9] Redirect to stdout --- scripts/install | 10 +++++----- scripts/upgrade | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index b533def..882c3ff 100755 --- a/scripts/install +++ b/scripts/install @@ -190,15 +190,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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2f9759a..c52f12d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,15 +115,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 #================================================= From 8b94630f27d9b787f8abd04eb0c2985d32bd1682 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 25 Mar 2022 13:26:35 +0700 Subject: [PATCH 2/9] Trying to get rid of minio console issue --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 911b979..28049dd 100644 --- a/conf/.env +++ b/conf/.env @@ -36,7 +36,7 @@ COLLABORATION_URL= AWS_ACCESS_KEY_ID=minio AWS_SECRET_ACCESS_KEY=__MINIO_KEY__ AWS_REGION=fr-ynh-1 -AWS_S3_UPLOAD_BUCKET_URL=https://__MINIO_DOMAIN__ +AWS_S3_UPLOAD_BUCKET_URL=https://__MINIO_DOMAIN__/server/ AWS_S3_UPLOAD_BUCKET_NAME=outlinestorage AWS_S3_UPLOAD_MAX_SIZE=26214400 AWS_S3_FORCE_PATH_STYLE=true From 48728b6a69274fb000b1881f191cfb0fea4536e2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 26 Mar 2022 20:45:23 +0700 Subject: [PATCH 3/9] Tests --- conf/.env | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env b/conf/.env index 28049dd..911b979 100644 --- a/conf/.env +++ b/conf/.env @@ -36,7 +36,7 @@ COLLABORATION_URL= AWS_ACCESS_KEY_ID=minio AWS_SECRET_ACCESS_KEY=__MINIO_KEY__ AWS_REGION=fr-ynh-1 -AWS_S3_UPLOAD_BUCKET_URL=https://__MINIO_DOMAIN__/server/ +AWS_S3_UPLOAD_BUCKET_URL=https://__MINIO_DOMAIN__ AWS_S3_UPLOAD_BUCKET_NAME=outlinestorage AWS_S3_UPLOAD_MAX_SIZE=26214400 AWS_S3_FORCE_PATH_STYLE=true diff --git a/scripts/install b/scripts/install index 882c3ff..7eb0daa 100755 --- a/scripts/install +++ b/scripts/install @@ -76,7 +76,7 @@ if yunohost app list | grep -q "$YNH_APP_ARG_DEX_DOMAIN"; then ynh_die "The domain provided for Dex is already used by another app. Please chose another one !" 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" +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 From a1cc57da8ffd224f85c6ad5a17fc9d11efd8bf1a Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 14:50:02 +0700 Subject: [PATCH 4/9] Change licence --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 5f544c2..deaeb89 100644 --- a/manifest.json +++ b/manifest.json @@ -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", From 143a849fbbbd60c97e32cafb6347c2b7f0f57ce0 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 15:19:12 +0700 Subject: [PATCH 5/9] =?UTF-8?q?Trying=20full=20install=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 13 ++++++++++++- scripts/backup | 2 ++ scripts/change_url | 2 ++ scripts/install | 10 ++++++---- scripts/remove | 2 ++ scripts/restore | 2 ++ scripts/upgrade | 2 ++ 7 files changed, 28 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index deaeb89..35a83c2 100644 --- a/manifest.json +++ b/manifest.json @@ -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" } ] } diff --git a/scripts/backup b/scripts/backup index ffe6481..742da2f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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) diff --git a/scripts/change_url b/scripts/change_url index 40cc62b..fe9c16a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -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) diff --git a/scripts/install b/scripts/install index 7eb0daa..b1a762d 100755 --- a/scripts/install +++ b/scripts/install @@ -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/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 -#================================================= +#=================================================== ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/opt/yunohost/$app diff --git a/scripts/remove b/scripts/remove index 7a3b163..36d4562 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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) diff --git a/scripts/restore b/scripts/restore index 53c19ba..5b4f4c1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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) diff --git a/scripts/upgrade b/scripts/upgrade index c52f12d..b943d2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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) From 6cbdb0ef09f4e628e47448e0a9cb771e0f07b321 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 15:25:36 +0700 Subject: [PATCH 6/9] Update .env --- conf/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env b/conf/.env index 911b979..c67d706 100644 --- a/conf/.env +++ b/conf/.env @@ -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 From 7da09fbeedf17fc8645351a70804116cfce027e2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 15:56:09 +0700 Subject: [PATCH 7/9] Removal of test repository for Dex install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b1a762d..a43884f 100755 --- a/scripts/install +++ b/scripts/install @@ -78,7 +78,7 @@ if yunohost app list | grep -q "$YNH_APP_ARG_DEX_DOMAIN"; then ynh_die "The domain provided for Dex is already used by another app. Please chose another one !" 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/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 From 95aa0079f7c5f074c54b57ca4a26257eb552b796 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 21:19:37 +0700 Subject: [PATCH 8/9] Update DISCLAIMER.md --- doc/DISCLAIMER.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 8bca22d..2aae159 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -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 From b2834fabbebbd32d06d98a9516b96c2f9d1ffbfd Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 21:23:20 +0700 Subject: [PATCH 9/9] Update remove --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 36d4562..ce55a8f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -120,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