DCD-1053: Add ability to specify the Lucene index directory.

This commit is contained in:
Steve Smith 2020-08-18 11:06:26 +10:00
parent 4b22953bb7
commit 359f56dd4d
3 changed files with 16 additions and 0 deletions

View File

@ -156,6 +156,11 @@ Example:
should be writable by the user `confluence`. See note below about UID
mappings.
* `ATL_LUCENE_INDEX_DIR`
The directory where [Lucene](https://lucene.apache.org/) search indexes should
be stored. Defaults to `index` under the Confluence home directory.
## Database configuration
It is optionally possible to configure the database from the environment,

View File

@ -11,6 +11,8 @@
<property name="webwork.multipart.saveDir">${localHome}/temp</property>
<property name="attachments.dir">${confluenceHome}/attachments</property>
<property name="lucene.index.dir">{{ atl_lucene_index_dir | default('${confluenceHome}/index') }}</property>
{% if atl_jdbc_url is defined %}
{% set databases = {
"mysql": ["com.mysql.jdbc.Driver", "MySQLDialect"],

View File

@ -172,6 +172,15 @@ def test_confluence_xml_default(docker_cli, image):
assert xml.findall('.//buildNumber')[0].text == "0"
assert xml.findall('.//property[@name="hibernate.connection.url"]') == []
assert xml.findall('.//property[@name="confluence.cluster.home"]') == []
assert xml.findall('.//property[@name="lucene.index.dir"]')[0].text == '${confluenceHome}/index'
def test_confluence_lucene_index(docker_cli, image):
container = run_image(docker_cli, image, environment={'ATL_LUCENE_INDEX_DIR': '/some/other/dir'})
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
xml = parse_xml(container, f'{get_app_home(container)}/confluence.cfg.xml')
assert xml.findall('.//property[@name="lucene.index.dir"]')[0].text == '/some/other/dir'
def test_confluence_xml_postgres(docker_cli, image, run_user):