local-clickhouse-cluster/docker-compose.yml

79 lines
2.0 KiB
YAML

services:
ch1:
image: clickhouse/clickhouse-server:23.1.3
restart: on-failure:10
volumes:
- ./config.xml:/etc/clickhouse-server/config.d/local.xml
- ./macro1.xml:/etc/clickhouse-server/config.d/macros.xml
- ./keeper1.xml:/etc/clickhouse-server/config.d/keeper.xml
- ch1data:/var/lib/clickhouse
ports:
- '18123:8123'
- '19000:9000'
ulimits:
nproc: 65536
nofile:
soft: 252144
hard: 252144
healthcheck:
test: wget --spider -q localhost:8123/ping
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
ch2:
image: clickhouse/clickhouse-server:23.1.3
restart: on-failure:10
volumes:
- ./config.xml:/etc/clickhouse-server/config.d/local.xml
- ./macro2.xml:/etc/clickhouse-server/config.d/macros.xml
- ./keeper2.xml:/etc/clickhouse-server/config.d/keeper.xml
- ch2data:/var/lib/clickhouse
ports:
- '28123:8123'
- '29000:9000'
ulimits:
nproc: 65536
nofile:
soft: 252144
hard: 252144
healthcheck:
test: wget --spider -q localhost:8123/ping
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
depends_on:
ch1:
condition: service_started
ch3:
image: clickhouse/clickhouse-server:23.1.3
restart: on-failure:10
volumes:
- ./config.xml:/etc/clickhouse-server/config.d/local.xml
- ./macro3.xml:/etc/clickhouse-server/config.d/macros.xml
- ./keeper3.xml:/etc/clickhouse-server/config.d/keeper.xml
- ch3data:/var/lib/clickhouse
ports:
- '38123:8123'
- '39000:9000'
ulimits:
nproc: 65536
nofile:
soft: 252144
hard: 252144
healthcheck:
test: wget --spider -q localhost:8123/ping
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
depends_on:
ch1:
condition: service_started
volumes:
ch1data:
ch2data:
ch3data: