From bab343172470738745c97e15ee150f76f9e9f1ce Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 26 Jan 2023 01:18:15 +0100 Subject: [PATCH] update issue indexing --- README.md | 7 ++++--- defaults/main.yml | 1 + templates/gitea.ini.j2 | 12 +++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5579f49..23ad026 100644 --- a/README.md +++ b/README.md @@ -172,11 +172,12 @@ Either you define exactly which release you install. Or you use the option ``lat | variable name | default value | description | | ------------- | ------------- | ----------- | | `gitea_repo_indexer_enabled` | `false` | Enables code search *(uses a lot of disk space, about 6 times more than the repository size).* | -| `gitea_repo_indexer_include` | `''` |Glob patterns to include in the index *(comma-separated list)*. An empty list means include all files. | -| `gitea_repo_indexer_exclude` | `''` | Glob patterns to exclude from the index (comma-separated list). | +| `gitea_repo_indexer_include` | |Glob patterns to include in the index *(comma-separated list)*. An empty list means include all files. | +| `gitea_repo_indexer_exclude` | | Glob patterns to exclude from the index (comma-separated list). | | `gitea_repo_exclude_vendored` | `true` | Exclude vendored files from index. | | `gitea_repo_indexer_max_file_size` | `1048576` | Maximum size in bytes of files to be indexed. | -| `gitea_indexer_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[indexer]` section of the config. | +| `gitea_indexer_extra_config` | | you can use this variable to pass additional config parameters in the `[indexer]` section of the config. | +| `gitea_queue_issue_indexer_extra_config` | | | you can use this variable to pass additional config parameters in the `[queue.issue_indexer]` section of the config. | ### Security ([security](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security)) | variable name | default value | description | diff --git a/defaults/main.yml b/defaults/main.yml index c46e0f4..041dfa3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -130,6 +130,7 @@ gitea_repo_indexer_exclude: '' gitea_repo_exclude_vendored: true gitea_repo_indexer_max_file_size: '1048576' gitea_indexer_extra_config: '' +gitea_queue_issue_indexer_extra_config: '' # Security (security) # -> https://docs.gitea.io/en-us/config-cheat-sheet/#security-security diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 1f8effe..eb28765 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -121,20 +121,26 @@ PASSWD = {{ gitea_db_password }} SSL_MODE = {{ gitea_db_ssl }} PATH = {{ gitea_db_path }} LOG_SQL = {{ gitea_db_log_sql | ternary('true', 'false') }} -{{ gitea_database_extra_config }} +{% if gitea_database_extra_config != '' %}{{ gitea_database_extra_config }}{% else %};{% endif %} ; ; ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#indexer-indexer [indexer] ISSUE_INDEXER_PATH = {{ gitea_home }}/indexers/issues.bleve -ISSUE_INDEXER_QUEUE_DIR = {{ gitea_home }}/indexers/issues.queue REPO_INDEXER_ENABLED = {{ gitea_repo_indexer_enabled | ternary('true', 'false') }} REPO_INDEXER_PATH = {{ gitea_home }}/indexers/repos.bleve REPO_INDEXER_INCLUDE = {{ gitea_repo_indexer_include }} REPO_INDEXER_EXCLUDE = {{ gitea_repo_indexer_exclude }} REPO_INDEXER_EXCLUDE_VENDORED = {{ gitea_repo_exclude_vendored | ternary('true', 'false') }} MAX_FILE_SIZE = {{ gitea_repo_indexer_max_file_size }} -{{ gitea_indexer_extra_config }} +{% if gitea_indexer_extra_config != '' %}{{ gitea_indexer_extra_config }}{% else %};{% endif %} +; +; +; Queue (queue and queue.*) +; -> https://docs.gitea.io/en-us/config-cheat-sheet/#queue-queue-and-queue +[queue.issue_indexer] +DATADIR = {{ gitea_home }}/indexers/issues.queue +{% if gitea_queue_issue_indexer_extra_config != '' %}{{ gitea_queue_issue_indexer_extra_config }}{% else %};{% endif %} ; ; ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#security-security