Merge pull request #7326 from nextcloud/enh/noid/allow-configure-fts-protocol

nextcloud: allow to configure `FULLTEXTSEARCH_PROTOCOL`
This commit is contained in:
Simon L. 2025-12-16 11:41:21 +01:00 committed by GitHub
commit da9276a964
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -972,6 +972,9 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
php /var/www/html/occ app:disable fulltextsearch_elasticsearch php /var/www/html/occ app:disable fulltextsearch_elasticsearch
php /var/www/html/occ app:disable files_fulltextsearch php /var/www/html/occ app:disable files_fulltextsearch
else else
if [ -z "$FULLTEXTSEARCH_PROTOCOL" ]; then
FULLTEXTSEARCH_PROTOCOL="http"
fi
if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
php /var/www/html/occ app:install fulltextsearch php /var/www/html/occ app:install fulltextsearch
elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then
@ -994,7 +997,7 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
php /var/www/html/occ app:update files_fulltextsearch php /var/www/html/occ app:update files_fulltextsearch
fi fi
php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}' 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://$FULLTEXTSEARCH_USER:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:$FULLTEXTSEARCH_PORT\",\"elastic_index\":\"$FULLTEXTSEARCH_INDEX\"}" php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"$FULLTEXTSEARCH_PROTOCOL://$FULLTEXTSEARCH_USER:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:$FULLTEXTSEARCH_PORT\",\"elastic_index\":\"$FULLTEXTSEARCH_INDEX\"}"
php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":true,\"files_office\":true}" php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":true,\"files_office\":true}"
# Do the index # Do the index

View file

@ -237,6 +237,7 @@
"PHP_MEMORY_LIMIT=%NEXTCLOUD_MEMORY_LIMIT%", "PHP_MEMORY_LIMIT=%NEXTCLOUD_MEMORY_LIMIT%",
"FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%", "FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%",
"FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch",
"FULLTEXTSEARCH_PROTOCOL=http",
"FULLTEXTSEARCH_PORT=9200", "FULLTEXTSEARCH_PORT=9200",
"FULLTEXTSEARCH_USER=elastic", "FULLTEXTSEARCH_USER=elastic",
"FULLTEXTSEARCH_INDEX=nextcloud-aio", "FULLTEXTSEARCH_INDEX=nextcloud-aio",