Merge pull request #6606 from thegcat/configurable_fulltextsearch_connection

Make elasticsearch connection configurable
This commit is contained in:
Simon L. 2025-07-17 14:11:00 +02:00 committed by GitHub
commit d2c0176e11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 2 deletions

View file

@ -809,7 +809,7 @@ fi
# Fulltextsearch
if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
while ! nc -z "$FULLTEXTSEARCH_HOST" 9200; do
while ! nc -z "$FULLTEXTSEARCH_HOST" "$FULLTEXTSEARCH_PORT"; do
echo "waiting for Fulltextsearch to become available..."
sleep 5
done
@ -835,7 +835,7 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
php /var/www/html/occ app:update files_fulltextsearch
fi
php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}'
php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"http://elastic:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:9200\",\"elastic_index\":\"nextcloud-aio\"}"
php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"http://$FULLTEXTSEARCH_USER:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:$FULLTEXTSEARCH_PORT\",\"elastic_index\":\"$FULLTEXTSEARCH_INDEX\"}"
php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":\"1\",\"files_office\":\"1\"}"
# Do the index

View file

@ -165,6 +165,9 @@ services:
- PHP_MEMORY_LIMIT=${NEXTCLOUD_MEMORY_LIMIT}
- FULLTEXTSEARCH_ENABLED
- FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch
- FULLTEXTSEARCH_PORT=9200
- FULLTEXTSEARCH_USER=elastic
- FULLTEXTSEARCH_INDEX=nextcloud-aio
- PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME}
- TRUSTED_CACERTS_DIR=${NEXTCLOUD_TRUSTED_CACERTS_DIR}
- STARTUP_APPS=${NEXTCLOUD_STARTUP_APPS}

View file

@ -110,6 +110,12 @@ spec:
value: "{{ .Values.FULLTEXTSEARCH_ENABLED }}"
- name: FULLTEXTSEARCH_HOST
value: nextcloud-aio-fulltextsearch
- name: FULLTEXTSEARCH_PORT
value: 9200
- name: FULLTEXTSEARCH_USER
value: elastic
- name: FULLTEXTSEARCH_INDEX
value: nextcloud-aio
- name: FULLTEXTSEARCH_PASSWORD
value: "{{ .Values.FULLTEXTSEARCH_PASSWORD }}"
- name: IMAGINARY_ENABLED

View file

@ -236,6 +236,9 @@
"PHP_MEMORY_LIMIT=%NEXTCLOUD_MEMORY_LIMIT%",
"FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%",
"FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch",
"FULLTEXTSEARCH_PORT=9200",
"FULLTEXTSEARCH_USER=elastic",
"FULLTEXTSEARCH_INDEX=nextcloud-aio",
"PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
"TRUSTED_CACERTS_DIR=%NEXTCLOUD_TRUSTED_CACERTS_DIR%",
"STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%",