appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🚀 Feature: Add Minio support (extend s3)

Open RealFascinated opened this issue 1 year ago • 8 comments

🔖 Feature description

Add a host option to the s3 adapter

🎤 Pitch

There is no way of changing the s3 host provider, so minio is currently unsupported

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

RealFascinated avatar Dec 13 '23 22:12 RealFascinated

Related utopia-php/storage issue: https://github.com/utopia-php/storage/issues/37

stnguyen90 avatar Dec 14 '23 03:12 stnguyen90

We're in the process of reviewing a community PR to add a generic S3 adapter.

eldadfux avatar Feb 11 '24 19:02 eldadfux

FYI, related S3 compatible adapter work: https://github.com/utopia-php/storage/issues/28

stnguyen90 avatar Apr 24 '24 16:04 stnguyen90

Is this feature available in Appwrite now? Asking this since the related repo's PR for S3 compatible adapters has been merged.

devNamanG avatar Jul 09 '24 09:07 devNamanG

how to configure the s3 URL?

itexpertnow avatar Jul 11 '24 13:07 itexpertnow

@itexpertnow I don't think it can be configured for Appwrite as of now.

devNamanG avatar Jul 22 '24 17:07 devNamanG

Hi guys!

I managed to get it working after making some adjustments. I am running everything locally in development mode.

I will try to send some PRs during the week to help you us.


But basically, I will take this opportunity to describe what I had to do. It was as follows:

  1. 📌 The latest version of the utopia-php/storage project is not the one with the most up-to-date code. ( requested here https://github.com/utopia-php/storage/issues/37#issuecomment-2269732620)

  2. 📌 Even if you use the latest version of the project, there is still a need for validation in two scenarios:

My Scenario 1: When the host is something like: http://minio-server:9001/

In this scenario, the project is not validating whether the host value already has the protocol or not, and it is always inserting the HTTPS protocol.

Additionally, the same code is always forcing the existence of a "bucket" value, always leaving the URL with a subdomain, which causes a series of inconveniences.

[!TIP] Updated comment: created PR for item 2 https://github.com/utopia-php/storage/pull/111

  1. 📌 Even after correcting these items, it is necessary to generate the most updated version of this utopia-php/storage package and make the appwrite project use it.

Waiting resolution of item 1 and 2

  1. 📌 After appwrite uses the updated package, it is still necessary for the ./appwrite/app file to use (from an environment variable) the URL of the Minio server host

Part of this resolution is in PR https://github.com/appwrite/appwrite/pull/7172 And then we need to make a new update to add the protocol variables and also pass them in the construction of new S3

jeffdrumgod avatar Aug 06 '24 02:08 jeffdrumgod