使用Docker-compose搭建zookeeper 3.5管理平台

因为docker搭建环境快捷、隔离性强、方便迁移等优点,所以我的环境基本使用dockerdocker-compose搭建,所以请大家先自行安装dockerdocker-compose

部署zookeeperzookeeper-ui管理平台的docker-compose.yml文件

version: '3.1'

services:
  zookeeper:
    image: zookeeper:3.5
    restart: always
    ports:
      - 2181:2181
    logging:
      driver: "json-file"
      options:
        max-size: "10k"
        max-file: "10"
  web:
    image: elkozmon/zoonavigator-web:0.5.0
    container_name: zoonavigator-web
    ports:
     - "8000:8000"
    environment:
      WEB_HTTP_PORT: 8000
      API_HOST: "api"
      API_PORT: 9000
    depends_on:
     - api
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "10k"
        max-file: "10"
  api:
    image: elkozmon/zoonavigator-api:0.5.0
    container_name: zoonavigator-api
    environment:
      API_HTTP_PORT: 9000
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "10k"
        max-file: "10"

这样访问http://ip:8000就能访问管理界面,其中的ip代表docker部署所在宿主机的IP地址。如下图:

《使用Docker-compose搭建zookeeper 3.5管理平台》 zookeeper管理界面.PNG

connect string的位置填写zookeeper的地址即可访问服务,比如127.0.0.1:2181

个人博客:https://blog.xvjialing.xyz

github主页:https://github.com/xvjialing

微信公众号

《使用Docker-compose搭建zookeeper 3.5管理平台》 微信公众号

    原文作者:褪色的记忆1994
    原文地址: https://www.jianshu.com/p/c5d2251eb7bc
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞