Giter Site home page Giter Site logo

Comments (6)

gedw99 avatar gedw99 commented on May 12, 2024 1

I was working on this today and was planning to make a makefile to make it easy to run minio with Pocketbase locally. Of course also without.

I was also planning to integrate s5cmd . https://github.com/peak/s5cmd . It supports file based and s3 based file operations.

from pocketbase.

Lex-2008 avatar Lex-2008 commented on May 12, 2024

Actually, you don't even need to install minio - they provide a "playground" minio instance at play.min.io:9000, access_key is Q3AM3UQ867SPQQA43P2F, secret_key is zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG.

from pocketbase.

ganigeorgiev avatar ganigeorgiev commented on May 12, 2024

@Lex-2008 I haven't tested with Minio (only DO and Vultr S3 offerings) but I suspect that it is some access control policy misconfiguration or similar. I'll change the endpoint to allow URIs and will update the dev error reporting to include the filesystem errors too.

from pocketbase.

Lex-2008 avatar Lex-2008 commented on May 12, 2024

Thanks! Indeed it might be some issue on my side, since @gedw99 seems to have them running together.

@gedw99: please let me know when you have something, I'll be happy to look at it!

No rush, though.

from pocketbase.

gedw99 avatar gedw99 commented on May 12, 2024

Yep will let you all know how it goes.
Thanks for the tips. Supporting every possible s3 out there is a PITA :)

from pocketbase.

Lex-2008 avatar Lex-2008 commented on May 12, 2024

Thanks @ganigeorgiev for implementing plain URL and error logging! I moved a bit closer to solution, but it still doesn't work for me :)

My findings, if anyone finds them useful:

It looks like pocketbase unconditionally prepends bucket name to endpoint and tries to upload file to http://test.127.0.0.1:9000/ (at this point, DNS resolution fails). If I change endpoint to hostname and add it to /etc/hosts - then pocketbase talks to minio, but still unsuccessfully.

Comparing minio "trace" logs generated by pocketbase and s3cmd uploads, it looks like s3cmd first executes s3.GetBucketLocation and then uses hostname without bucketname (i.e. plain localhost - probably as instructed by minio), while pocketbase always prepends bucketname to hostname (i.e. connects to test.localhost) - what confuses minio.

So it looks like minio is not-s3-enough for AWS library used by pocketbase :)

The option S3ForcePathStyle can be related:
https://github.com/aws/aws-sdk-go/blob/main/aws/config.go#L118
but I don't want to push @ganigeorgiev to work on this too much :) especially since AWS themselves deprecated it.

Also, if there's still an option, probably this can be converted to a discussion, since it's not an issue with pocketbase, but actually more like a usage question.

from pocketbase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.