mirror of
https://github.com/YunoHost-Apps/outline_ynh.git
synced 2024-09-03 19:56:12 +02:00
commit
629e968b1f
16 changed files with 72 additions and 202 deletions
17
README.md
17
README.md
|
@ -21,12 +21,11 @@ The fastest wiki and knowledge base for growing teams. Beautiful, feature rich,
|
|||
### Features
|
||||
|
||||
- Fully working installation of Outline wiki
|
||||
- Including a MinIO server for avatars and picture object storage
|
||||
- Including a Dex server to connect to Yunohost's LDAP userbase using an OIDC auth flow
|
||||
- Using Yunohost's built-in SMTP server for notifications
|
||||
|
||||
|
||||
**Shipped version:** 0.69.2.2~ynh1
|
||||
**Shipped version:** 0.72.0.3~ynh2
|
||||
|
||||
**Demo:** https://app.getoutline.com/create
|
||||
|
||||
|
@ -39,16 +38,15 @@ The fastest wiki and knowledge base for growing teams. Beautiful, feature rich,
|
|||
### 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.68.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
The Outline version shipped with this package (v0.72.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
|
||||
### Known limitations
|
||||
|
||||
1. The app can now run in the CI server and reach level 7. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [MinIO app](https://github.com/YunoHost-apps/minio_ynh) to be installed (MinIO installation and setup is automatic, though)
|
||||
3. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) to be installed (Dex installation and setup is automatic, though)
|
||||
4. The app is requiring three domains including two fully dedicated (one for MinIO server, one for Dex, one for Outline)
|
||||
5. ARM architectures are not yet supported (But it should be achievable soon)
|
||||
6. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
1. The app can now run in the CI server and reach level 8. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) 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 yet supported (But it should be achievable soon)
|
||||
5. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
|
||||
|
||||
### How to create an admin user
|
||||
|
@ -66,7 +64,6 @@ You can then change the user rights by default and/or change the admin user afte
|
|||
* Official user documentation: <https://www.getoutline.com/about>
|
||||
* Official admin documentation: <https://www.getoutline.com/developers>
|
||||
* Upstream app code repository: <https://github.com/outline/outline>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_outline>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/outline_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
|
17
README_fr.md
17
README_fr.md
|
@ -21,12 +21,11 @@ The fastest wiki and knowledge base for growing teams. Beautiful, feature rich,
|
|||
### Features
|
||||
|
||||
- Fully working installation of Outline wiki
|
||||
- Including a MinIO server for avatars and picture object storage
|
||||
- Including a Dex server to connect to Yunohost's LDAP userbase using an OIDC auth flow
|
||||
- Using Yunohost's built-in SMTP server for notifications
|
||||
|
||||
|
||||
**Version incluse :** 0.69.2.2~ynh1
|
||||
**Version incluse :** 0.72.0.3~ynh2
|
||||
|
||||
**Démo :** https://app.getoutline.com/create
|
||||
|
||||
|
@ -39,16 +38,15 @@ The fastest wiki and knowledge base for growing teams. Beautiful, feature rich,
|
|||
### 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.68.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
The Outline version shipped with this package (v0.72.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
|
||||
### Known limitations
|
||||
|
||||
1. The app can now run in the CI server and reach level 7. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [MinIO app](https://github.com/YunoHost-apps/minio_ynh) to be installed (MinIO installation and setup is automatic, though)
|
||||
3. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) to be installed (Dex installation and setup is automatic, though)
|
||||
4. The app is requiring three domains including two fully dedicated (one for MinIO server, one for Dex, one for Outline)
|
||||
5. ARM architectures are not yet supported (But it should be achievable soon)
|
||||
6. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
1. The app can now run in the CI server and reach level 8. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) 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 yet supported (But it should be achievable soon)
|
||||
5. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
|
||||
|
||||
### How to create an admin user
|
||||
|
@ -66,7 +64,6 @@ You can then change the user rights by default and/or change the admin user afte
|
|||
* Documentation officielle utilisateur : <https://www.getoutline.com/about>
|
||||
* Documentation officielle de l’admin : <https://www.getoutline.com/developers>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/outline/outline>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_outline>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/outline_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
language="fr"
|
||||
dex_domain="dex.domain.tld"
|
||||
dex_path="/example"
|
||||
minio_domain="minio.domain.tld"
|
||||
minio_admin="package_checker"
|
||||
minio_password="1Strong-Password"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
@ -19,7 +16,7 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
#upgrade=1 from_commit=CommitHash
|
||||
#upgrade=1 from_commit=f56cd7d
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
change_url=0
|
||||
|
@ -27,6 +24,6 @@
|
|||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=CommitHash
|
||||
; commit=f56cd7d
|
||||
name=Name and date of the commit.
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
|
||||
|
|
10
conf/.env
10
conf/.env
|
@ -29,14 +29,8 @@ PORT=__PORT__
|
|||
# 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_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
|
||||
AWS_S3_UPLOAD_MAX_SIZE=26214400
|
||||
AWS_S3_FORCE_PATH_STYLE=true
|
||||
AWS_S3_ACL=private
|
||||
FILE_STORAGE=local
|
||||
FILE_STORAGE_UPLOAD_MAX_SIZE=106214400
|
||||
|
||||
|
||||
# –––––––––––––– AUTHENTICATION ––––––––––––––
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/outline/outline/archive/25e8c32b8403042b6813e2a6861f4cd16586ed69.zip
|
||||
SOURCE_SUM=8bb592ae014e653752311eb0664cc7741faaeb14b7101b06c5b55d878b616658
|
||||
SOURCE_URL=https://github.com/outline/outline/archive/5397907599d373bcb5cef8057d4c58526d64b084.zip
|
||||
SOURCE_SUM=751bfaf5b1abb346337c537795540a4a809e544891d1313ed1df66b31261df5e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "AllowPublicRead",
|
||||
"Effect": "Allow",
|
||||
"Principal": {
|
||||
"AWS": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
"Action": [
|
||||
"s3:GetObject"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::outlinestorage/public/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -3,6 +3,5 @@ The fastest wiki and knowledge base for growing teams. Beautiful, feature rich,
|
|||
### Features
|
||||
|
||||
- Fully working installation of Outline wiki
|
||||
- Including a MinIO server for avatars and picture object storage
|
||||
- Including a Dex server to connect to Yunohost's LDAP userbase using an OIDC auth flow
|
||||
- Using Yunohost's built-in SMTP server for notifications
|
||||
|
|
|
@ -1,16 +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.68.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
The Outline version shipped with this package (v0.72.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE).
|
||||
|
||||
### Known limitations
|
||||
|
||||
1. The app can now run in the CI server and reach level 7. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [MinIO app](https://github.com/YunoHost-apps/minio_ynh) to be installed (MinIO installation and setup is automatic, though)
|
||||
3. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) to be installed (Dex installation and setup is automatic, though)
|
||||
4. The app is requiring three domains including two fully dedicated (one for MinIO server, one for Dex, one for Outline)
|
||||
5. ARM architectures are not yet supported (But it should be achievable soon)
|
||||
6. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
1. The app can now run in the CI server and reach level 8. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server**
|
||||
2. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) 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 yet supported (But it should be achievable soon)
|
||||
5. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly
|
||||
|
||||
|
||||
### How to create an admin user
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Wiki and knowledge base for teams",
|
||||
"fr": "Wiki et base de connaissances pour les équipes"
|
||||
},
|
||||
"version": "0.69.2.2~ynh1",
|
||||
"version": "0.72.0.3~ynh2",
|
||||
"url": "www.getoutline.com",
|
||||
"upstream": {
|
||||
"license": "BUSL-1.1",
|
||||
|
@ -64,30 +64,6 @@
|
|||
"en": "Path for authentication URL. Please don't use 'auth' as it will break NGINX configuration.",
|
||||
"fr": "Chemin de l'URL d'authentification. Veuillez ne pas utiliser 'auth' car cela casserait la configuration NGINX."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "minio_domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Domain for MinIO app, used for images and attachments storage. If not yet installed, it will automatically be. MinIO has to be installed at the root.",
|
||||
"fr": "Domaine pour l'application MinIO, utilisé pour le stockage des images et des pièces jointes. S'il n'est pas encore installé, il le sera automatiquement. MinIO doit être installé à la racine."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "minio_admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Administrator for MinIO app, used for images and attachments storage. Please note that if MinIO is already installed, that setting won't be used.",
|
||||
"fr": "Administrateur pour l'application MinIO, utilisée pour le stockage des images et des pièces jointes. Veuillez noter que si MinIO est déjà installé, ce paramètre ne sera pas utilisé."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "minio_password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Password for MinIO administrator",
|
||||
"fr": "Mot de passe pour l'administrateur MinIO"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -36,10 +36,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
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=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
|
||||
|
@ -61,18 +57,10 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
### script is called. Hence ynh_backups calls takes basically 0 seconds to run.
|
||||
|
||||
#=================================================
|
||||
# BACKUP MINIO
|
||||
# BACKUP LOCAL STORAGE
|
||||
#=================================================
|
||||
|
||||
ynh_secure_remove --file="$mc_path/outlinestorage"
|
||||
pushd "$mc_path"
|
||||
ynh_exec_warn_less sudo -u minio mkdir outlinestorage
|
||||
ynh_exec_warn_less sudo -u minio ./mc mirror --a minio/outlinestorage ./outlinestorage/
|
||||
popd
|
||||
|
||||
ynh_secure_remove --file="$final_path/outlinestorage"
|
||||
mv "$mc_path/outlinestorage" "$final_path/outlinestorage"
|
||||
chown -R outline:www-data "$final_path/outlinestorage"
|
||||
ynh_backup --src_path="/var/lib/outline"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
|
|
|
@ -35,10 +35,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
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=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
|
||||
|
|
|
@ -43,27 +43,6 @@ utils_secret=$(ynh_hex_32_random)
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# CHECK IF MINIO IS INSTALLED, IF NOT INSTALL IT
|
||||
#=================================================
|
||||
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
|
||||
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
|
||||
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)
|
||||
mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path)
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEX APP FOR OAUTH2 / OIDC
|
||||
#=================================================
|
||||
|
@ -117,10 +96,6 @@ ynh_app_setting_set --app=$app --key=language --value=$language
|
|||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
ynh_app_setting_set --app=$app --key=utils_secret --value=$utils_secret
|
||||
ynh_app_setting_set --app=$app --key=language_key --value=$language_key
|
||||
ynh_app_setting_set --app=$app --key=minio_domain --value=$minio_domain
|
||||
ynh_app_setting_set --app=$app --key=minio_admin --value=$minio_admin
|
||||
ynh_app_setting_set --app=$app --key=minio_password --value=$minio_password
|
||||
ynh_app_setting_set --app=$app --key=mc_path --value=$mc_path
|
||||
ynh_app_setting_set --app=$app --key=dex_app --value=$dex_app
|
||||
ynh_app_setting_set --app=$app --key=dex_domain --value=$dex_domain
|
||||
ynh_app_setting_set --app=$app --key=dex_path --value=$dex_path
|
||||
|
@ -190,17 +165,11 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# SETUP MINIO BUCKET
|
||||
# SETUP LOCAL STORAGE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up MinIO bucket for Outline..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json"
|
||||
chown minio:www-data "$mc_path/policy.json"
|
||||
|
||||
pushd "$mc_path"
|
||||
ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1"
|
||||
ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage
|
||||
popd
|
||||
mkdir "/var/lib/$app"
|
||||
chown -R $app:www-data "/var/lib/$app"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -220,7 +189,7 @@ pushd "$final_path"
|
|||
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 --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 yarn build 2>&1
|
||||
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
|
||||
popd
|
||||
|
|
|
@ -24,10 +24,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
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=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
|
||||
|
@ -100,14 +96,10 @@ ynh_script_progression --message="Removing Dex app used for Outline auth..." --w
|
|||
yunohost app remove $dex_app
|
||||
|
||||
#=================================================
|
||||
# REMOVE MINIO BUCKET
|
||||
# REMOVE LOCAL STORAGE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Outline MinIO bucket..." --weight=1
|
||||
|
||||
pushd "$mc_path"
|
||||
ynh_exec_warn_less sudo -u minio ./mc rb minio/outlinestorage --force
|
||||
popd
|
||||
ynh_secure_remove --file="$mc_path/outlinestorage"
|
||||
ynh_script_progression --message="Removing Outline local storage..." --weight=1
|
||||
ynh_secure_remove --file="/var/lib/outline"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
|
|
|
@ -36,10 +36,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
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=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
|
||||
|
@ -72,22 +68,6 @@ if ! yunohost app list | grep -q "id: $dex_app"; then
|
|||
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"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CHECK IF MINIO IS INSTALLED, IF NOT INSTALL IT
|
||||
#=================================================
|
||||
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
|
||||
if yunohost app list | grep -q "$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
|
||||
yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$minio_domain&is_$public=true&admin=$minio_admin&password=$minio_password"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
@ -117,21 +97,16 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE MINIO
|
||||
# RESTORE LOCAL STORAGE
|
||||
#=================================================
|
||||
|
||||
mv "$final_path/outlinestorage" "$mc_path/outlinestorage"
|
||||
chown -R minio:www-data "$mc_path/outlinestorage"
|
||||
ynh_script_progression --message="Restoring the app local storage..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json"
|
||||
chown minio:www-data "$mc_path/policy.json"
|
||||
ynh_restore_file --origin_path="/var/lib/outline"
|
||||
|
||||
pushd "$mc_path"
|
||||
ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1"
|
||||
ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage
|
||||
popd
|
||||
|
||||
ynh_secure_remove --file="$mc_path/outlinestorage"
|
||||
chmod 750 "/var/lib/outline"
|
||||
chmod -R o-rwx "/var/lib/outline"
|
||||
chown -R $app:www-data "/var/lib/outline"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
|
|
@ -24,10 +24,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
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=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
|
||||
|
@ -51,7 +47,6 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
|
|||
|
||||
# Ugly fix for an early mistake - to be removed with next upgrade
|
||||
ynh_secure_remove --file="$final_path/outlinestorage"
|
||||
ynh_secure_remove --file="$mc_path/outlinestorage"
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -88,24 +83,41 @@ then
|
|||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --full_replace=1
|
||||
ynh_secure_remove --file="$final_path"
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
fi
|
||||
|
||||
ynh_script_progression --message="Done" --weight=1
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# UPDATE MINIO BUCKET
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating outlinestorage MinIO bucket access policy..." --weight=1
|
||||
#=======================================================
|
||||
# MIGRATE MINIO BUCKET IF UPGRADING FROM AN OLD VERSION
|
||||
#=======================================================
|
||||
|
||||
ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json"
|
||||
chown minio:www-data "$mc_path/policy.json"
|
||||
ynh_script_progression --message="Checking if a migration is needed"
|
||||
if ynh_compare_current_package_version --comparison le --version 0.69.2.2~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Migrating MinIO data to local directory"
|
||||
|
||||
minio_domain=$(ynh_app_setting_get --app=$app --key=minio_domain)
|
||||
minio_admin=$(ynh_app_setting_get --app=$app --key=minio_admin)
|
||||
minio_password=$(ynh_app_setting_get --app=$app --key=minio_password)
|
||||
mc_path=$(ynh_app_setting_get --app=$app --key=mc_path)
|
||||
|
||||
pushd "$mc_path"
|
||||
ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage
|
||||
popd
|
||||
mkdir -p "/var/lib/$app/data"
|
||||
chown -R minio:www-data "/var/lib/$app"
|
||||
ynh_exec_warn_less sudo -u minio $mc_path/mc mirror --preserve "minio/outlinestorage" "/var/lib/$app/data"
|
||||
|
||||
chown -R $app:www-data "/var/lib/$app"
|
||||
ynh_script_progression --message="Data migration finished"
|
||||
ynh_script_progression --message="Data bucket was kept for safety, just in case !"
|
||||
ynh_script_progression --message="Don't forget to remove MinIO app if you don't use it !"
|
||||
else
|
||||
ynh_script_progression --message="No migration to be done"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -138,7 +150,7 @@ pushd "$final_path"
|
|||
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 --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 yarn build 2>&1
|
||||
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
|
||||
popd
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx
|
||||
index 3584f03b4..c72e6f3fb 100644
|
||||
index 4d4f6f09c..f457025d5 100644
|
||||
--- a/server/emails/mailer.tsx
|
||||
+++ b/server/emails/mailer.tsx
|
||||
@@ -138,6 +138,7 @@ export class Mailer {
|
||||
@@ -208,6 +208,7 @@ export class Mailer {
|
||||
: {
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
+ ignoreTLS:true
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue