diff --git a/README.md b/README.md index faeca2c..f3afdf2 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,35 @@ MinIO is a High Performance Object Storage released under GNU Affero General Pub ![](./doc/screenshots/minio-browser.jpg) +## Disclaimers / important information + +## How to create a Yunohost app using MinIO +During the install process, MinIO will install both the MinIO server and MinIO client. +If your app needs to use an Amazon S3 storage, I recommend to use the MinIO client to create and setup buckets as per your app's requirements. You can have a look at outline_ynh app for reference. + +### First step : retrieve MinIO credentials +``` +#================================================= +# SETUP MINIO CREDENTIALS +#================================================= +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) +``` + +### Second step : create and setup your bucket +``` +#================================================= +# SETUP MINIO BUCKET +#================================================= +ynh_script_progression --message="Setting up MinIO bucket for YOURAPP..." --weight=1 + +pushd "$mc_path" + ynh_exec_warn_less sudo -u minio ./mc mb minio/NAME_OF_YOUR_BUCKET --region "NAME_OF_YOUR_REGION" + ynh_exec_warn_less sudo -u minio ./mc policy set NEEDED_POLICY minio/NAME_OF_YOUR_BUCKET +popd +``` ## Documentation and resources * Official app website: https://min.io diff --git a/README_fr.md b/README_fr.md index 333208c..718d487 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,6 +22,35 @@ MinIO is a High Performance Object Storage released under GNU Affero General Pub ![](./doc/screenshots/minio-browser.jpg) +## Avertissements / informations importantes + +## How to create a Yunohost app using MinIO +During the install process, MinIO will install both the MinIO server and MinIO client. +If your app needs to use an Amazon S3 storage, I recommend to use the MinIO client to create and setup buckets as per your app's requirements. You can have a look at outline_ynh app for reference. + +### First step : retrieve MinIO credentials +``` +#================================================= +# SETUP MINIO CREDENTIALS +#================================================= +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) +``` + +### Second step : create and setup your bucket +``` +#================================================= +# SETUP MINIO BUCKET +#================================================= +ynh_script_progression --message="Setting up MinIO bucket for YOURAPP..." --weight=1 + +pushd "$mc_path" + ynh_exec_warn_less sudo -u minio ./mc mb minio/NAME_OF_YOUR_BUCKET --region "NAME_OF_YOUR_REGION" + ynh_exec_warn_less sudo -u minio ./mc policy set NEEDED_POLICY minio/NAME_OF_YOUR_BUCKET +popd +``` ## Documentations et ressources * Site officiel de l'appĀ : https://min.io diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index e69de29..9171983 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -0,0 +1,27 @@ +## How to create a Yunohost app using MinIO +During the install process, MinIO will install both the MinIO server and MinIO client. +If your app needs to use an Amazon S3 storage, I recommend to use the MinIO client to create and setup buckets as per your app's requirements. You can have a look at outline_ynh app for reference. + +### First step : retrieve MinIO credentials +``` +#================================================= +# SETUP MINIO CREDENTIALS +#================================================= +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) +``` + +### Second step : create and setup your bucket +``` +#================================================= +# SETUP MINIO BUCKET +#================================================= +ynh_script_progression --message="Setting up MinIO bucket for YOURAPP..." --weight=1 + +pushd "$mc_path" + ynh_exec_warn_less sudo -u minio ./mc mb minio/NAME_OF_YOUR_BUCKET --region "NAME_OF_YOUR_REGION" + ynh_exec_warn_less sudo -u minio ./mc policy set NEEDED_POLICY minio/NAME_OF_YOUR_BUCKET +popd +``` \ No newline at end of file