From aaae938f54145b0ebdd21ad9d6ba68c70dc7e57d Mon Sep 17 00:00:00 2001 From: YngvarHuang <625452882@qq.com> Date: Tue, 14 Oct 2025 09:38:47 +0800 Subject: [PATCH] Add kibana tool in the docker compose file(#10525) (#10526) ### What problem does this PR solve? add kibana tool in the docker compose file(#10525) ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: virgilwong --- docker/.env | 7 +++++-- docker/docker-compose-base.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/docker/.env b/docker/.env index 63c12a465..d2220d323 100644 --- a/docker/.env +++ b/docker/.env @@ -37,9 +37,12 @@ OPENSEARCH_PASSWORD=infini_rag_flow_OS_01 # The port used to expose the Kibana service to the host machine, # allowing EXTERNAL access to the service running inside the Docker container. +# To enable kibana, you need to: +# 1. Ensure that COMPOSE_PROFILES includes kibana, for example: COMPOSE_PROFILES=${DOC_ENGINE},kibana +# 2. Comment out or delete the following configurations of the es service in docker-compose-base.yml: xpack.security.enabled、xpack.security.http.ssl.enabled、xpack.security.transport.ssl.enabled (for details: https://www.elastic.co/docs/deploy-manage/security/self-auto-setup#stack-existing-settings-detected) +# 3. Adjust the es.hosts in conf/service_config.yaml or docker/service_conf.yaml.template to 'https://localhost:1200' +# 4. After the startup is successful, in the es container, execute the command to generate the kibana token: `bin/elasticsearch-create-enrollment-token -s kibana`, then you can use kibana normally KIBANA_PORT=6601 -KIBANA_USER=rag_flow -KIBANA_PASSWORD=infini_rag_flow # The maximum amount of the memory, in bytes, that a specific Docker container can use while running. # Update it according to the available memory in the host machine. diff --git a/docker/docker-compose-base.yml b/docker/docker-compose-base.yml index 44832fdfc..44c62d18b 100644 --- a/docker/docker-compose-base.yml +++ b/docker/docker-compose-base.yml @@ -207,6 +207,30 @@ services: start_period: 10s + kibana: + container_name: ragflow-kibana + profiles: + - kibana + image: kibana:${STACK_VERSION} + ports: + - ${KIBANA_PORT-5601}:5601 + env_file: .env + environment: + - TZ=${TIMEZONE} + volumes: + - kibana_data:/usr/share/kibana/data + depends_on: + es01: + condition: service_started + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5601/api/status"] + interval: 10s + timeout: 10s + retries: 120 + networks: + - ragflow + restart: on-failure + volumes: esdata01: @@ -221,6 +245,8 @@ volumes: driver: local redis_data: driver: local + kibana_data: + driver: local networks: ragflow: