version: '3'
services:
  zookeeper:
    container_name: zookeeper
    image: debezium/zookeeper:${DEBEZIUM_VERSION}
    ports:
     - 2181:2181
     - 2888:2888
     - 3888:3888
  kafka:
    container_name: kafka
    image: debezium/kafka:${DEBEZIUM_VERSION}
    ports:
     - 9092:9092
    links:
     - zookeeper
    environment:
     - ZOOKEEPER_CONNECT=zookeeper:2181
  connect:
    container_name: connect
    image: debezium/connect:${DEBEZIUM_VERSION}
    build:
      context: debezium-with-oracle-jdbc
      args:
        DEBEZIUM_VERSION: ${DEBEZIUM_VERSION}
    ports:
     - 8083:8083
     - 5005:5005
    links:
     - kafka
    volumes:
     - /Users/elena.cuevas/workspaces/docker/debezium_apollo_last/debezium-with-oracle-jdbc/xstreams.jar /kafka/libs
     - /Users/elena.cuevas/workspaces/docker/debezium_apollo_last/debezium-with-oracle-jdbc/oracle_instantclient/ojdbc8.jar /kafka/libs
    environment:
     - BOOTSTRAP_SERVERS=kafka:9092
     - GROUP_ID=1
     - CONFIG_STORAGE_TOPIC=my_connect_configs
     - OFFSET_STORAGE_TOPIC=my_connect_offsets
     - STATUS_STORAGE_TOPIC=my_connect_statuses
     - LD_LIBRARY_PATH=/instant_client
     - KAFKA_DEBUG=true
     - DEBUG_SUSPEND_FLAG=n
     - JAVA_DEBUG_PORT=0.0.0.0:5005
  oracle-db:
    container_name: dbz_oracle
    image: oracleinanutshell/oracle-xe-11g:latest
    ports:
      - 1521:1521
      - 5500:5500
    volumes:
      - /Users/elena.cuevas/workspaces/docker/debezium_apollo_last:/app
      - /Users/elena.cuevas/workspaces/docker/debezium_apollo_last/scripts:/docker-entrypoint-initdb.d
    environment:
    - ORACLE_ALLOW_REMOTE=YES
    - ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe