Untitled

 avatar
user_7290026
plain_text
2 months ago
1.5 kB
2
Indexable
Never
# есть и более свежии версии, но depends_on + condition работает только на младше 3.0
# табличка по номерам версий https://docs.docker.com/compose/compose-file/
version: "2.4"

services:

  zoo:
    image: registry.delta.sbrf.ru/pprb/ci00636331/ci02172624_ucpcloud/zookeeper:3.4.9
    hostname: shard_zoo
    container_name: shard_zoo
    ports:
      - "2181:2181"
    environment:
      ZOO_MY_ID: 1
      ZOO_PORT: 2181
      ZOO_SERVERS: server.1=shard_zoo:2888:3888
    volumes:
      - ./.volumes/shard_zoo/data:/data
      - ./.volumes/shard_zoo/datalog:/datalog
  kafka:
    image: registry.delta.sbrf.ru/pprb/ci00636331/ci02172624_ucpcloud/confluentinc/cp-kafka:5.4.0
    hostname: shard_kafka
    container_name: shard_kafka
    ports:
      - "9092:9092"
    environment:
      KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://shard_kafka:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
      KAFKA_ZOOKEEPER_CONNECT: "shard_zoo:2181"
      KAFKA_BROKER_ID: 1
      KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
    volumes:
      - ./.volumes/shard_kafka/data:/var/lib/kafka/data
    depends_on:
      - zoo
Leave a Comment