-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.cluster.yml
46 lines (43 loc) · 1.49 KB
/
docker-compose.cluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: '2.3'
services:
clickhouse1:
image: 'clickhouse/clickhouse-server:${CLICKHOUSE_VERSION-24.8-alpine}'
ulimits:
nofile:
soft: 262144
hard: 262144
hostname: clickhouse1
container_name: clickhouse-js-clickhouse-server-node-1
ports:
- '8124:8123'
- '9000:9000'
- '9181:9181'
volumes:
- './.docker/clickhouse/cluster/server1_config.xml:/etc/clickhouse-server/config.xml'
- './.docker/clickhouse/cluster/server1_macros.xml:/etc/clickhouse-server/config.d/macros.xml'
- './.docker/clickhouse/users.xml:/etc/clickhouse-server/users.xml'
clickhouse2:
image: 'clickhouse/clickhouse-server:${CLICKHOUSE_VERSION-24.8-alpine}'
ulimits:
nofile:
soft: 262144
hard: 262144
hostname: clickhouse2
container_name: clickhouse-js-clickhouse-server-node-2
ports:
- '8125:8123'
- '9001:9000'
- '9182:9181'
volumes:
- './.docker/clickhouse/cluster/server2_config.xml:/etc/clickhouse-server/config.xml'
- './.docker/clickhouse/cluster/server2_macros.xml:/etc/clickhouse-server/config.d/macros.xml'
- './.docker/clickhouse/users.xml:/etc/clickhouse-server/users.xml'
# Using Nginx as a cluster entrypoint and a round-robin load balancer for HTTP requests
nginx:
image: 'nginx:1.23.1-alpine'
hostname: nginx
ports:
- '8123:8123'
volumes:
- './.docker/nginx/local.conf:/etc/nginx/conf.d/local.conf'
container_name: clickhouse-js-nginx