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

Updates MinIO

This commit is contained in:
Limezy 2021-11-10 01:18:06 +07:00
parent 63b38d660c
commit cf199541c8
3 changed files with 37 additions and 1 deletions

View file

@ -39,7 +39,7 @@ PORT=__PORT__
AWS_ACCESS_KEY_ID=__MINIO_ID__
AWS_SECRET_ACCESS_KEY=__MINIO_KEY__
AWS_REGION=fr-ynh-1
AWS_S3_UPLOAD_BUCKET_URL=__MINIO_DOMAIN__
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

7
conf/mc.src Normal file
View file

@ -0,0 +1,7 @@
SOURCE_URL=https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2021-11-05T10-05-06Z
SOURCE_SUM=9f5ad72fd93678f9f756c6da34a8d4d1e61f7356a96ee327c652ad765975d2b2
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mc
SOURCE_EXTRACT=false

View file

@ -72,6 +72,8 @@ ynh_script_progression --message="Validating installation parameters..." --time
final_path=/opt/yunohost/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
mc_path=$final_path/mc
# Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
@ -151,6 +153,32 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK MINIO CLIENT
#=================================================
ynh_script_progression --message="Setting up MinIO client..." --time --weight=1
ynh_setup_source --dest_dir="$mc_path" --source_id=mc
# FIXME: this should be managed by the core in the future
# Here, as a packager, you may have to tweak the ownerhsip/permissions
# such that the appropriate users (e.g. maybe www-data) can access
# files in some cases.
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
# this will be treated as a security issue.
chmod -R 750 "$mc_path"
chmod -R o-rwx "$mc_path"
chown -R $app:www-data "$mc_path"
#=================================================
# SETUP MINIO BUCKET
#=================================================
ynh_script_progression --message="Setting up MinIO bucket for Outline..." --time --weight=1
$mc_path/mc alias set minio "https://$minio_domain" $minio_id $minio_key
$mc_path/mc mb minio/outlinestorage --region "fr-ynh-1"
$mc_path/mc policy set public minio/outlinestorage
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -159,6 +187,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --time --weig
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# BUILD YARN DEPENDENCIES
#=================================================