Go: introduce clickhouse (#16996)

### Summary

Introduce Clickhouse for data statistics.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-16 18:36:56 +08:00
committed by GitHub
parent caa76fb68e
commit c7a623ff81
11 changed files with 297 additions and 26 deletions

View File

@@ -342,6 +342,37 @@ services:
restart: unless-stopped
clickhouse:
profiles:
- clickhouse
image: clickhouse/clickhouse-server:26.5.5.8
volumes:
- clickhouse_data:/var/lib/clickhouse
- ./init-clickhouse.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- ${CLICKHOUSE_TCP_PORT:-9900}:9000
- ${CLICKHOUSE_HTTP_PORT:-8123}:8123
env_file: .env
environment:
- CLICKHOUSE_USER=${CLICKHOUSE_USER:-ragflow}
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-infini_rag_flow}
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
mem_limit: ${MEM_LIMIT}
ulimits:
nofile:
soft: 655350
hard: 655350
healthcheck:
test: ["CMD", "clickhouse-client", "--user", "${CLICKHOUSE_USER:-ragflow}", "--password", "${CLICKHOUSE_PASSWORD:-infini_rag_flow}", "-q", "SELECT 1"]
interval: 10s
timeout: 10s
retries: 30
start_period: 30s
networks:
- ragflow
restart: unless-stopped
volumes:
esdata01:
driver: local
@@ -365,6 +396,8 @@ volumes:
driver: local
nats_data:
driver: local
clickhouse_data:
driver: local
networks:
ragflow: