version: '3.9'

services:

  zookeeper-sync:
    image: 47.110.145.204:8084/huansiyl/debezium/zookeeper:1.9.5.Final
    ports:
      - "2181:2181"
      - "2888:2888"
      - "3888:3888"
    restart: always

  kafka-sync:
    image: 47.110.145.204:8084/huansiyl/debezium/kafka:1.9.5.Final
    restart: always
    ports:
      - "9092"
      - "29092:29092"
    depends_on:
      - zookeeper-sync
    environment:
      - ZOOKEEPER_CONNECT=zookeeper-sync:2181
      - KAFKA_ADVERTISED_LISTENERS=LISTENER_EXT://localhost:29092,LISTENER_INT://kafka-sync:9092
      - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=LISTENER_INT:PLAINTEXT,LISTENER_EXT:PLAINTEXT
      - KAFKA_LISTENERS=LISTENER_INT://:9092,LISTENER_EXT://:29092
      - KAFKA_INTER_BROKER_LISTENER_NAME=LISTENER_INT
      - KAFKA_LOG_RETENTION_BYTES=1073741824
      - KAFKA_LOG_SEGMENT_BYTES=268435456
      - KAFKA_LOG_RETENTION_MS=300000
      - KAFKA_LOG_CLEANUP_POLICY=delete

  connect:
    image: 47.110.145.204:8084/huansiyl/debezium/connect:1.9.5.Final
    restart: always
    ports:
      - "8083:8083"
    environment:
      - BOOTSTRAP_SERVERS=kafka-sync:9092
      - GROUP_ID=1
      - CONFIG_STORAGE_TOPIC=my_connect_configs
      - OFFSET_STORAGE_TOPIC=my_connect_offsets
      - STATUS_STORAGE_TOPIC=my_connect_statuses
    depends_on:
      - zookeeper-sync
      - kafka-sync