1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

update zookeeper

This commit is contained in:
kev 2019-09-26 19:41:55 +08:00
parent 3a7412cfae
commit d45838ce06
3 changed files with 17 additions and 6 deletions

View File

@ -8,9 +8,11 @@ zookeeper:
volumes:
- /data/zookeeper/data:/data
- /data/zookeeper/datalog:/datalog
- /data/zookeeper/logs:/logs
environment:
- ZOO_MY_ID=1
- ZOO_SERVERS=server.1=0.0.0.0:2888:3888;2181 server.2=zookeeper2:2888:3888;2181 server.3=zookeeper3:2888:3888;2181
- ZOO_LOG4J_PROP=INFO,ROLLINGFILE
extra_hosts:
- zookeeper1:10.0.0.21
- zookeeper2:10.0.0.22

View File

@ -15,8 +15,11 @@ zookeeper:
ports:
- "2181:2181"
volumes:
- ./data:/data
- ./datalog:/datalog
- ./data/data:/data
- ./data/datalog:/datalog
- ./data/logs:/logs
environment:
- ZOO_LOG4J_PROP=INFO,ROLLINGFILE
restart: always
```
@ -28,7 +31,8 @@ $ docker-compose up -d
$ docker-compose exec zookeeper zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
Mode: leader
Client port found: 2181. Client address: localhost.
Mode: standalone
$ docker-compose exec zookeeper zkCli.sh
>>> help
@ -40,7 +44,9 @@ $ docker-compose exec zookeeper zkCli.sh
Click [this][2] to learn more.
## Cluster Mode [TODO]
## Cluster Mode
See: https://github.com/vimagick/dockerfiles/tree/master/kafka
[1]: http://zookeeper.apache.org/
[2]: https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html

View File

@ -3,6 +3,9 @@ zookeeper:
ports:
- "2181:2181"
volumes:
- ./data:/data
- ./datalog:/datalog
- ./data/data:/data
- ./data/datalog:/datalog
- ./data/logs:/logs
environment:
- ZOO_LOG4J_PROP=INFO,ROLLINGFILE
restart: always