Şöyle yaparız. Burada 3 tane zookeeper çalıştırılıyor
version: '3.1'services:zoo1:image: zookeeperrestart: alwayshostname: zoo1ports:- 2181:2181- 80:8080environment:ZOO_ADMINSERVER_ENABLED: "True"ZOO_MY_ID: 1ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181zoo2:image: zookeeperrestart: alwayshostname: zoo2ports:- 2182:2181environment:ZOO_MY_ID: 2ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181zoo3:image: zookeeperrestart: alwayshostname: zoo3ports:- 2183:2181environment:ZOO_MY_ID: 3ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
No comments:
Post a Comment