From ea54237ca30027114e3f7104ad8c095edd5e0709 Mon Sep 17 00:00:00 2001 From: Sergey Kirichenko Date: Tue, 21 Mar 2023 11:09:19 +0300 Subject: [PATCH] Add possibility configure elc at run docker-entrypoint (#1294) * Fix set elastic env at runnuing docker-entrypoint * Configure elastic during running service * Cosmetic change --- build/install/docker/.env | 2 +- build/install/docker/docker-entrypoint.py | 8 ++++---- build/install/docker/docspace.yml | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build/install/docker/.env b/build/install/docker/.env index fa698d42fb..649e17f65d 100644 --- a/build/install/docker/.env +++ b/build/install/docker/.env @@ -7,7 +7,7 @@ CONTAINER_PREFIX=${PRODUCT}- MYSQL_VERSION=8.0.32 MYSQL_IMAGE=mysql:${MYSQL_VERSION} - ELK_VERSION=7.13.1 + ELK_VERSION=7.10.0 SERVICE_PORT=5050 DOCUMENT_SERVER_IMAGE_NAME=onlyoffice/4testing-documentserver-ee:latest DOCKERFILE=Dockerfile.app diff --git a/build/install/docker/docker-entrypoint.py b/build/install/docker/docker-entrypoint.py index 609cc740af..499664a409 100755 --- a/build/install/docker/docker-entrypoint.py +++ b/build/install/docker/docker-entrypoint.py @@ -148,10 +148,10 @@ writeJsonFile(filePath, jsonData) filePath = "/app/onlyoffice/config/elastic.json" jsonData = openJsonFile(filePath) -updateJsonData(jsonData,"$.elastic.Scheme", ELK_SHEME) -updateJsonData(jsonData,"$.elastic.Host", ELK_HOST) -updateJsonData(jsonData,"$.elastic.Port", ELK_PORT) -updateJsonData(jsonData,"$.elastic.Threads", ELK_THREADS) +jsonData["elastic"]["Scheme"] = ELK_SHEME +jsonData["elastic"]["Host"] = ELK_HOST +jsonData["elastic"]["Port"] = ELK_PORT +jsonData["elastic"]["Threads"] = ELK_THREADS writeJsonFile(filePath, jsonData) filePath = "/app/onlyoffice/config/kafka.json" diff --git a/build/install/docker/docspace.yml b/build/install/docker/docspace.yml index 1de9f32494..97b75f1f54 100644 --- a/build/install/docker/docspace.yml +++ b/build/install/docker/docspace.yml @@ -29,13 +29,16 @@ x-service: &x-service-base services: onlyoffice-elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION} + image: onlyoffice/elasticsearch:${ELK_VERSION} container_name: ${ELK_HOST} restart: always environment: - discovery.type=single-node - bootstrap.memory_lock=true - - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "ES_JAVA_OPTS=-Xms4g -Xmx4g -Dlog4j2.formatMsgNoLookups=true" + - "indices.fielddata.cache.size=30%" + - "indices.memory.index_buffer_size=30%" + - "ingest.geoip.downloader.enabled=false" ulimits: memlock: soft: -1