version: '3'
services:
zookeeper:
image: zookeeper
ports:
- "2181:2181"
- "2182:2182"
volumes:
- "/data/clickhouse/zk/data:/data"
- "/data/clickhouse/zk/log:/datalog"
deploy:
placement:
constraints:
- node.hostname == SHA11DMPHAMP01
# networks:
# - clickhouse
clickhouse203:
image: yandex/clickhouse-server
container_name: clickhouse203
expose:
- "9000"
- "8123"
user: root
privileged: true
deploy:
placement:
constraints:
- node.hostname == SHA11DMPHDOP01
ports:
- "111.250.128.203:9000:9000"
- "111.250.128.203:8123:8123"
volumes:
- "/data/clickhouse/etc:/etc/clickhouse-server"
- "/data/clickhouse/data:/var/lib/clickhouse"
- "/data/clickhouse/log:/var/log/clickhouse-server"
ulimits:
nofile:
soft: 262144
hard: 262144
depends_on:
- "zookeeper"
# networks:
# - clickhouse_network
clickhouse204:
image: yandex/clickhouse-server
container_name: clickhouse204
expose:
- "9000"
- "8123"
user: root
privileged: true
deploy:
placement:
constraints:
- node.hostname == SHA11DMPHDOP02
ports:
- "111.250.128.204:9001:9000"
- "111.250.128.204:8124:8123"
volumes:
- "/data/clickhouse/etc:/etc/clickhouse-server"
- "/data/clickhouse/data:/var/lib/clickhouse"
- "/data/clickhouse/log:/var/log/clickhouse-server"
ulimits:
nofile:
soft: 262144
hard: 262144
depends_on:
- "zookeeper"
# networks:
# - clickhouse
clickhouse205:
image: yandex/clickhouse-server
container_name: clickhouse205
expose:
- "9000"
- "8123"
user: root
privileged: true
deploy:
placement:
constraints:
- node.hostname == SHA11DMPHDOP03
ports:
- "111.250.128.205:9002:9000"
- "111.250.128.205:8125:8123"
volumes:
- "/data/clickhouse/etc:/etc/clickhouse-server"
- "/data/clickhouse/data:/var/lib/clickhouse"
- "/data/clickhouse/log:/var/log/clickhouse-server"
ulimits:
nofile:
soft: 262144
hard: 262144
depends_on:
- "zookeeper"
# networks:
# - clickhouse
clickhouse206:
image: yandex/clickhouse-server
container_name: clickhouse206
expose:
- "9000"
- "8123"
user: root
privileged: true
deploy:
placement:
constraints:
- node.hostname == SHA11DMPHDOP04
ports:
- "111.250.128.206:9003:9000"
- "111.250.128.206:8126:8123"
volumes:
- "/data/clickhouse/etc:/etc/clickhouse-server"
- "/data/clickhouse/data:/var/lib/clickhouse"
- "/data/clickhouse/log:/var/log/clickhouse-server"
ulimits:
nofile:
soft: 262144
hard: 262144
depends_on:
- "zookeeper"
# networks:
# - clickhouse
#networds:
# clickhouse_network: