diff options
author | Giteabot <teabot@gitea.io> | 2023-06-14 02:36:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 08:36:52 +0200 |
commit | 21cd5c2f3d5c3914096f1ecfb2d2f1d13165caa4 (patch) | |
tree | 387e8150a764ef690cbb58a0f23e026b8e985b3b /custom/conf | |
parent | 22948048b2637495ace3091c0e0a9c6a0d96ec30 (diff) | |
download | gitea-21cd5c2f3d5c3914096f1ecfb2d2f1d13165caa4.tar.gz gitea-21cd5c2f3d5c3914096f1ecfb2d2f1d13165caa4.zip |
Fix all possible setting error related storages and added some tests (#23911) (#25244)
Backport #23911 by @lunny
Follow up #22405
Fix #20703
This PR rewrites storage configuration read sequences with some breaks
and tests. It becomes more strict than before and also fixed some
inherit problems.
- Move storage's MinioConfig struct into setting, so after the
configuration loading, the values will be stored into the struct but not
still on some section.
- All storages configurations should be stored on one section,
configuration items cannot be overrided by multiple sections. The
prioioty of configuration is `[attachment]` > `[storage.attachments]` |
`[storage.customized]` > `[storage]` > `default`
- For extra override configuration items, currently are `SERVE_DIRECT`,
`MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another
section. The prioioty of the override configuration is `[attachment]` >
`[storage.attachments]` > `default`.
- Add more tests for storages configurations.
- Update the storage documentations.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'custom/conf')
-rw-r--r-- | custom/conf/app.example.ini | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 23dfefa013..f53d9ee089 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -2392,6 +2392,10 @@ LEVEL = Info ;; Enable/Disable package registry capabilities ;ENABLED = true ;; +;STORAGE_TYPE = local +;; override the minio base path if storage type is minio +;MINIO_BASE_PATH = packages/ +;; ;; Path for chunked uploads. Defaults to APP_DATA_PATH + `tmp/package-upload` ;CHUNKED_UPLOAD_PATH = tmp/package-upload ;; @@ -2454,6 +2458,19 @@ LEVEL = Info ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; repo-archive storage will override storage +;; +;[repo-archive] +;STORAGE_TYPE = local +;; +;; Where your lfs files reside, default is data/lfs. +;PATH = data/repo-archive +;; +;; override the minio base path if storage type is minio +;MINIO_BASE_PATH = repo-archive/ + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; settings for repository archives, will override storage setting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[storage.repo-archive] @@ -2471,6 +2488,9 @@ LEVEL = Info ;; ;; Where your lfs files reside, default is data/lfs. ;PATH = data/lfs +;; +;; override the minio base path if storage type is minio +;MINIO_BASE_PATH = lfs/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2520,6 +2540,7 @@ LEVEL = Info ; [actions] ;; Enable/Disable actions capabilities ;ENABLED = false +;; ;; Default address to get action plugins, e.g. the default value means downloading from "https://gitea.com/actions/checkout" for "uses: actions/checkout@v3" ;DEFAULT_ACTIONS_URL = https://gitea.com |