Add default storage configurations (#12813)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao 2020-09-29 17:05:13 +08:00 committed by GitHub
parent 4c6ac08182
commit 3878e985b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 459 additions and 185 deletions

View file

@ -778,25 +778,25 @@ MAX_SIZE = 4
MAX_FILES = 5
; Storage type for attachments, `local` for local disk or `minio` for s3 compatible
; object storage service, default is `local`.
STORE_TYPE = local
STORAGE_TYPE = local
; Allows the storage driver to redirect to authenticated URLs to serve files directly
; Currently, only `minio` is supported.
SERVE_DIRECT = false
; Path for attachments. Defaults to `data/attachments` only available when STORE_TYPE is `local`
; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local`
PATH = data/attachments
; Minio endpoint to connect only available when STORE_TYPE is `minio`
; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
MINIO_ENDPOINT = localhost:9000
; Minio accessKeyID to connect only available when STORE_TYPE is `minio`
; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
MINIO_ACCESS_KEY_ID =
; Minio secretAccessKey to connect only available when STORE_TYPE is `minio`
; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
MINIO_SECRET_ACCESS_KEY =
; Minio bucket to store the attachments only available when STORE_TYPE is `minio`
; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
MINIO_BUCKET = gitea
; Minio location to create bucket only available when STORE_TYPE is `minio`
; Minio location to create bucket only available when STORAGE_TYPE is `minio`
MINIO_LOCATION = us-east-1
; Minio base path on the bucket only available when STORE_TYPE is `minio`
; Minio base path on the bucket only available when STORAGE_TYPE is `minio`
MINIO_BASE_PATH = attachments/
; Minio enabled ssl only available when STORE_TYPE is `minio`
; Minio enabled ssl only available when STORAGE_TYPE is `minio`
MINIO_USE_SSL = false
[time]
@ -1161,3 +1161,28 @@ QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
MAX_ATTEMPTS = 3
; Backoff time per http/https request retry (seconds)
RETRY_BACKOFF = 3
; default storage for attachments, lfs and avatars
[storage]
; storage type
STORAGE_TYPE = local
; lfs storage will override storage
[lfs]
STORAGE_TYPE = local
; customize storage
;[storage.my_minio]
;STORAGE_TYPE = minio
; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
;MINIO_ENDPOINT = localhost:9000
; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
;MINIO_ACCESS_KEY_ID =
; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
;MINIO_SECRET_ACCESS_KEY =
; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
;MINIO_BUCKET = gitea
; Minio location to create bucket only available when STORAGE_TYPE is `minio`
;MINIO_LOCATION = us-east-1
; Minio enabled ssl only available when STORAGE_TYPE is `minio`
;MINIO_USE_SSL = false