-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add a storage layer for attachments #11387
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor nits
cb5249f
to
2281f93
Compare
It's ready to review now. |
e7ce453
to
e4456c1
Compare
9124d4e
to
5ac9912
Compare
169c5e0
to
461e546
Compare
It's ready to review again now. |
Writing out my thoughts in case others thinking the same as me. I was thinking about suggesting renaming minio flags, and storage provider to be s3, as s3 is mostly generic, however having it specifically be minio is better because not all s3 providers act the same. (ex. DO Spaces only supports a legacy way of listing objects in a bucket). So by having it be minio means we can later add providers as needed in case there are any edge cases they have. |
@techknowlogick Yeah. For a self-hosted private deployment, a self-hosted minio is a better chosen. For those public gitea instances, they may want s3 compitable services. I kept a simple interface for ObjectStorage and not use an exist package so that future implementations for s3, DO or other public services are easy enough. |
Co-authored-by: guillep2k <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to fix check
local
disk orminio
(via s3 protocol). It's inspired by NOT MERGED: Add bucket storage support #9567 but with a smaller interface to handle the object storages. According minio's document, it should support toaccess any Amazon S3 compatible object storage
.(https://docs.min.io/docs/golang-client-quickstart-guide.html)Below are the steps to migrate your attachments to a minio service.
Second, change your
app.ini
sectionattachment
to changeSTORE_TYPE
asminio
and other information like above.Last, restart gitea. It's done.
Next steps (On other PRs):