Skip to content

Commit 43ea4a5

Browse files
committed
feat: 新增clickhouse支持
1 parent 8b1a297 commit 43ea4a5

6 files changed

Lines changed: 55 additions & 3 deletions

File tree

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ ELASTICSEARCH_HOST_PORT=9200
4242

4343
# Kibana
4444
kIBANA_HOST_PORT=5601
45-
kIBANA_I18N_LOCALE=zh-CN
45+
kIBANA_I18N_LOCALE=zh-CN
46+
47+
# ClickHouse
48+
CLICKHOUSE_PORT=8123

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
7. mongo:7.0(官方镜像)
3333
8. elasticsearch:7.17.25(官方镜像)
3434
9. kibana:7.17.25(官方镜像)
35+
10. clickhouse-server:24.8(官方镜像)
3536

3637
# 目录
3738

@@ -56,6 +57,7 @@
5657
/
5758
├── logs 日志存放目录
5859
├── services
60+
│   ├── clickhouse ClickHouse 配置目录
5961
│   ├── elasticsearch Elasticsearch 配置目录
6062
│   ├── mongodb MongoDB 配置目录
6163
│   ├── mysql Mysql 配置目录

docker-compose.yml.example

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ services:
165165
- discovery.type=single-node
166166
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
167167
volumes:
168-
- es-data:/usr/share/elasticsearch/data
168+
- elasticsearch-data:/usr/share/elasticsearch/data
169169
- ${DIR_SERVICES}/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
170170
hostname: elasticsearch
171171
user: 1000:1000
@@ -198,12 +198,42 @@ services:
198198
max-size: "10m"
199199
max-file: "1"
200200

201+
clickhouse:
202+
image: clickhouse/clickhouse-server:24.8
203+
ulimits:
204+
nofile:
205+
soft: 262144
206+
hard: 262144
207+
cap_add:
208+
- SYS_NICE
209+
- NET_ADMIN
210+
- IPC_LOCK
211+
environment:
212+
TZ: ${TZ}
213+
volumes:
214+
- clickhouse-data:/var/lib/clickhouse
215+
- ${DIR_LOGS}/clickhouse:/var/log/clickhouse-server
216+
- ${DIR_SERVICES}/clickhouse/config.d:/etc/clickhouse-server/config.d:ro
217+
- ${DIR_SERVICES}/clickhouse/users.d:/etc/clickhouse-server/users.d:ro
218+
hostname: clickhouse
219+
ports:
220+
- "${CLICKHOUSE_PORT}:8123"
221+
networks:
222+
- default
223+
restart: unless-stopped
224+
logging:
225+
driver: "json-file"
226+
options:
227+
max-size: "10m"
228+
max-file: "1"
229+
201230
volumes:
202231
mysql-data:
203232
redis-data:
204233
rabbitmq-data:
205234
mongo-data:
206-
es-data:
235+
elasticsearch-data:
236+
clickhouse-data:
207237

208238
networks:
209239
default:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!.gitignore
3+
!docker_related_config.xml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<clickhouse>
2+
<!-- Listen wildcard address to allow accepting connections from other containers and host network. -->
3+
<listen_host>::</listen_host>
4+
<listen_host>0.0.0.0</listen_host>
5+
<listen_try>1</listen_try>
6+
7+
<!--
8+
<logger>
9+
<console>1</console>
10+
</logger>
11+
-->
12+
</clickhouse>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)