diff --git a/search-services/README.md b/search-services/README.md index 0d799f33d..ffe561ace 100644 --- a/search-services/README.md +++ b/search-services/README.md @@ -270,7 +270,7 @@ $ docker build -t insightengine:develop . **Configuration** -To pass an environment variable, it can be used the "-e" argument: +The "-e" argument can be used to pass an environment variable: ```bash $ docker run -e SOLR_JAVA_MEM="-Xms4g -Xmx4g" -p 8983:8983 searchservices:develop @@ -282,6 +282,19 @@ To pass several environment variables (e.g. SOLR\_ALFRESCO\_HOST, SOLR\_ALFRESCO $ docker run -e SOLR_ALFRESCO_HOST=localhost -e SOLR_ALFRESCO_PORT=8080 -p 8983:8983 searchservices:develop ``` +The following environment variables are supported: + +| Name | Format | Description | +|------|--------|-------------| +| SOLR_OPTS | "-Dparam=value ..." | Options to pass when starting the Java process. | +| SOLR_HEAP | Memory amount (e.g. 2g) | The Java heap assigned to Solr. | +| SOLR_JAVA_MEM | "-Xms... -Xmx..." | The exact memory settings for Solr. Note that SOLR_HEAP takes precedence over this. | +| MAX_SOLR_RAM_PERCENTAGE | Integer | The percentage of available memory to assign to Solr. Note that SOLR_HEAP and SOLR_JAVA_MEM take precedence over this. | +| SEARCH_LOG_LEVEL | ERROR, WARN, INFO, DEBUG or TRACE | The root logger level. | +| ENABLE_SPELLCHECK | true or false | Whether spellchecking is enabled or not. | +| ALFRESCO_SECURE_COMMS | https or none | Whether communication with the repository is secured. See below. | +| SOLR_SSL_... | --- | These variables are also used to configure SSL. See below. | + **Using Mutual Auth TLS (SSL)** This Docker image is exposing as VOLUME the folder `/opt/alfresco-search-services/keystores`, that can be used to mount `keystores` folder from host. diff --git a/search-services/packaging/src/docker/search_config_setup.sh b/search-services/packaging/src/docker/search_config_setup.sh index 12fc0bf36..f9db6daee 100644 --- a/search-services/packaging/src/docker/search_config_setup.sh +++ b/search-services/packaging/src/docker/search_config_setup.sh @@ -9,6 +9,7 @@ SOLR_RERANK_CONFIG_FILE=$RERANK_TEMPLATE_PATH/solrconfig.xml SOLR_NORERANK_CONFIG_FILE=$NORERANK_TEMPLATE_PATH/solrconfig.xml SOLR_RERANK_CORE_FILE=$RERANK_TEMPLATE_PATH/solrcore.properties SOLR_NORERANK_CORE_FILE=$NORERANK_TEMPLATE_PATH/solrcore.properties +LOG_PROPERTIES=$PWD/logs/log4j.properties if [[ $REPLICATION_TYPE == "master" ]]; then @@ -99,4 +100,8 @@ if [[ true == "$ENABLE_SPELLCHECK" ]]; then sed -i 's/#alfresco.suggestable.property/alfresco.suggestable.property/' ${PWD}/solrhome/conf/shared.properties fi -bash -c "$@" \ No newline at end of file +if [[ "${SEARCH_LOG_LEVEL}" != "" ]]; then + sed -i "s/log4j.rootLogger=WARN, file, CONSOLE/log4j.rootLogger=${SEARCH_LOG_LEVEL}, file, CONSOLE/" ${LOG_PROPERTIES} +fi + +bash -c "$@"