version: '3'
services:
  zookeeper:
    image: debezium/zookeeper:0.8.3.Final
    ports:
      - 2181:2181
      - 2888:2888
      - 3888:3888
    networks:
      - net

  kafka:
    image: debezium/kafka:0.8.3.Final
    links:
      - zookeeper
    environment:
    - ZOOKEEPER_CONNECT=zookeeper:2181
    ports:
      - 9092:9092
    networks:
      - net

  kafkaconnect:
    image: debezium/connect:0.8.3.Final
    ports:
    - 8083:8083
    links:
    - kafka
    - zookeeper
    - postgres
    environment:
    - BOOTSTRAP_SERVERS=kafka:9092
    - GROUP_ID=1
    - CONFIG_STORAGE_TOPIC=my_connect_configs
    - OFFSET_STORAGE_TOPIC=my_connect_offsets
    networks:
    - net

  postgres:
    image: debezium/postgres:9.6
    networks:
    - net
    ports:
    - 5432:5432

networks:
  net:
    driver: bridge
