Skip to content

Instantly share code, notes, and snippets.

@shihuibei
Forked from everpeace/docker-compose.yml
Created September 10, 2019 03:59
Show Gist options
  • Select an option

  • Save shihuibei/20dcdbd2594c764375fec81da246c692 to your computer and use it in GitHub Desktop.

Select an option

Save shihuibei/20dcdbd2594c764375fec81da246c692 to your computer and use it in GitHub Desktop.

Revisions

  1. @everpeace everpeace revised this gist Aug 21, 2017. 1 changed file with 12 additions and 10 deletions.
    22 changes: 12 additions & 10 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,19 @@
    # WARNING: This docker-compose.yml is only for testing purpose.
    # Parameters:
    # - CONFLUENT_PLATFORM_VERSION (3.0.0 by default)
    # - name: CONFLUENT_PLATFORM_VERSION
    # default: 3.0.0
    # reference: https://hub.docker.com/u/confluentinc/
    # Ports:
    # - Major ports are exposed to host computer as below:
    # - description: Major ports are exposed to host computer
    # - zookeeper: 2181
    # kafka1: 9091
    # kafka2: 9092
    # kafka3: 9093
    # kafka4: 9094
    # kafka5: 9095
    # Tips: >
    # You can up part of the cluster like
    # $ docker-compose up -d kafka1 kafka2 kafka3
    # kafka1: 9091
    # kafka2: 9092
    # kafka3: 9093
    # kafka4: 9094
    # kafka5: 9095
    # Tips:>
    # - You can up part of the cluster with below command.
    # $ docker-compose up -d kafka1 kafka2 kafka3

    version: '3.3'
    services:
  2. @everpeace everpeace revised this gist Aug 21, 2017. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,16 @@
    # WARNING: This docker-compose.yml is only for testing purpose.
    # Parameters:
    # CONFLUENT_PLATFORM_VERSION (3.0.0 by default)
    # - CONFLUENT_PLATFORM_VERSION (3.0.0 by default)
    # Ports:
    # Major ports are exposed to host computer as below:
    # zookeeper: 2181
    # kafka1: 9091
    # kafka2: 9092
    # kafka3: 9093
    # kafka4: 9094
    # kafka5: 9095
    #
    # You can up part of the cluster like
    # - Major ports are exposed to host computer as below:
    # - zookeeper: 2181
    # kafka1: 9091
    # kafka2: 9092
    # kafka3: 9093
    # kafka4: 9094
    # kafka5: 9095
    # Tips: >
    # You can up part of the cluster like
    # $ docker-compose up -d kafka1 kafka2 kafka3

    version: '3.3'
  3. @everpeace everpeace renamed this gist Aug 21, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @everpeace everpeace created this gist Aug 21, 2017.
    110 changes: 110 additions & 0 deletions docker-compose
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,110 @@
    # WARNING: This docker-compose.yml is only for testing purpose.
    # Parameters:
    # CONFLUENT_PLATFORM_VERSION (3.0.0 by default)
    # Ports:
    # Major ports are exposed to host computer as below:
    # zookeeper: 2181
    # kafka1: 9091
    # kafka2: 9092
    # kafka3: 9093
    # kafka4: 9094
    # kafka5: 9095
    #
    # You can up part of the cluster like
    # $ docker-compose up -d kafka1 kafka2 kafka3

    version: '3.3'
    services:
    zookeeper:
    image: confluentinc/cp-zookeeper:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    ports:
    - "2181:2181"
    - "2888:2888"
    - "3888:3888"
    healthcheck:
    test: echo stat | nc localhost 2181
    interval: 10s
    timeout: 10s
    retries: 3
    environment:
    - ZOOKEEPER_SERVER_ID=1
    - ZOOKEEPER_CLIENT_PORT=2181
    - ZOOKEEPER_TICK_TIME=2000
    - ZOOKEEPER_INIT_LIMIT=5
    - ZOOKEEPER_SYNC_LIMIT=2
    - ZOOKEEPER_SERVERS=zookeeper:2888:3888
    kafka1:
    image: confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    healthcheck:
    test: ps augwwx | egrep [S]upportedKafka
    depends_on:
    - zookeeper
    ports:
    - "9091:9091"
    environment:
    - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:9091
    - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9091
    - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
    - KAFKA_BROKER_ID=1
    - BOOTSTRAP_SERVERS=kafka1:9091,kafka2:9092,kafka3:9093,kafka4:9094,kafka5:9095
    - ZOOKEEPER=zookeeper:2181
    kafka2:
    image: confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    healthcheck:
    test: ps augwwx | egrep [S]upportedKafka
    depends_on:
    - zookeeper
    ports:
    - "9092:9092"
    environment:
    - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka2:9092
    - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092
    - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
    - KAFKA_BROKER_ID=2
    - BOOTSTRAP_SERVERS=kafka1:9091,kafka2:9092,kafka3:9093,kafka4:9094,kafka5:9095
    - ZOOKEEPER=zookeeper:2181
    kafka3:
    image: confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    healthcheck:
    test: ps augwwx | egrep [S]upportedKafka
    depends_on:
    - zookeeper
    ports:
    - "9093:9093"
    environment:
    - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka3:9093
    - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9093
    - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
    - KAFKA_BROKER_ID=3
    - BOOTSTRAP_SERVERS=kafka1:9091,kafka2:9092,kafka3:9093,kafka4:9094,kafka5:9095
    - ZOOKEEPER=zookeeper:2181
    kafka4:
    image: confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    healthcheck:
    test: ps augwwx | egrep [S]upportedKafka
    depends_on:
    - zookeeper
    ports:
    - "9094:9094"
    environment:
    - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka4:9094
    - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9094
    - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
    - KAFKA_BROKER_ID=4
    - BOOTSTRAP_SERVERS=kafka1:9091,kafka2:9092,kafka3:9093,kafka4:9094,kafka5:9095
    - ZOOKEEPER=zookeeper:2181
    kafka5:
    image: confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-3.0.0}
    healthcheck:
    test: ps augwwx | egrep [S]upportedKafka
    depends_on:
    - zookeeper
    ports:
    - "9095:9095"
    environment:
    - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka5:9095
    - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9095
    - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
    - KAFKA_BROKER_ID=5
    - BOOTSTRAP_SERVERS=kafka1:9091,kafka2:9092,kafka3:9093,kafka4:9094,kafka5:9095
    - ZOOKEEPER=zookeeper:2181