-
Notifications
You must be signed in to change notification settings - Fork 210
Use minio
instead of postgres locally
#463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
minio wouldn't replace PostgreSQL altogether: on production we store documentation files in S3, and the rest (queue, build logs, releases...) on PostgreSQL. Adding minio locally would allow us to get rid of parts of the database code, but more importantly align the development environment with production. |
Hi 👋 I would like to dive into this. |
@koenaad 👋 I've never used minio myself, so you'll have to experiment with that. Here are some of the things you'll have to modify, though:
This is the actual code for uploading files: https://github.com/rust-lang/docs.rs/blob/master/src/db/file.rs#L214 |
Thanks for the pointers @jyn514. Don't have any experience with minio either, but I'll simply spin up the docker and see what I can do with it 😃 |
docs.rs expects there to be a bucket 'rust-docs-rs', the minio Docker image does not provide a nice way to launch with a default bucket. As a workaround, we have to override the entrypoint to do some work before starting the minio server. When the minio server is launched with a directory that is not empty, it will interpret the directories present as buckets it needs to create. So by adding an empty directory 'rust-docs-rs', we can trick minio in creating a similarly named bucket. This solution is a mixture of the following comments: - minio/minio#4769 (comment) - minio/minio#4769 (comment)
Uh oh!
There was an error while loading. Please reload this page.
Discussed on discord:
I think this involves spinning up a minio container instead of a postgres container and using rusoto_s3 to interact with it. @pietroalbini would know more.
The text was updated successfully, but these errors were encountered: