From 35ffd02b443dd671201421bb0b9827791156be94 Mon Sep 17 00:00:00 2001 From: Hyduan Date: Tue, 8 Jan 2019 15:29:04 +0800 Subject: [PATCH] Add ZooKeeper Component (#1899) --- docker-compose.yml | 11 +++++++++++ env-example | 4 ++++ zookeeper/Dockerfile | 10 ++++++++++ 3 files changed, 25 insertions(+) create mode 100644 zookeeper/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 0c3ff899..09bb188c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -437,6 +437,17 @@ services: networks: - backend +### ZooKeeper ######################################### + zookeeper: + build: ./zookeeper + volumes: + - ${DATA_PATH_HOST}/zookeeper/data:/data + - ${DATA_PATH_HOST}/zookeeper/datalog:/datalog + ports: + - "${ZOOKEEPER_PORT}:2181" + networks: + - backend + ### Aerospike ########################################## aerospike: build: ./aerospike diff --git a/env-example b/env-example index b9866d63..af6e1a98 100644 --- a/env-example +++ b/env-example @@ -207,6 +207,10 @@ MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d REDIS_PORT=6379 +### ZooKeeper ############################################# + +ZOOKEEPER_PORT=2181 + ### Percona ############################################### PERCONA_DATABASE=homestead diff --git a/zookeeper/Dockerfile b/zookeeper/Dockerfile new file mode 100644 index 00000000..8d5723de --- /dev/null +++ b/zookeeper/Dockerfile @@ -0,0 +1,10 @@ +FROM zookeeper:latest + +LABEL maintainer="Hyduan " + +VOLUME /data +VOLUME /datalog + +EXPOSE 2181 + +CMD ["zookeeper"]