version: "2.0"

networks:
  kafka-net1:
    driver: bridge
#    ipam:
#      config:
#        - subnet: 172.19.0.0/16
#        - gateway: 172.19.0.1

volumes:
  zookeeper1_data:
    driver: local
  zookeeper2_data:
    driver: local
  zookeeper3_data:
    driver: local
  kafka1_data:
    driver: local
  kafka2_data:
    driver: local
  kafka3_data:
    driver: local
  kafdrop_data:
    driver: local
  mysql_source_data:
    driver: local
  connect_source_data:
    driver: local
  schemaRegsitry_data:
    driver: local
  schemaRegsitryUI_data:
    driver: local
  postgres_target_data:
    driver: local
  debeziumUI_data:
    driver: local
  nifi_data:
    driver: local

services:
  zookeeper1:
    container_name: zookeeper1
    image: docker.io/bitnami/zookeeper:3.7
    hostname: zookeeper1
    restart: always
    ports:
      - '2181'
      - '2888'
      - '3888'
    volumes:
      - ./zookeeper1_data:/data
    networks:
      - kafka-net1
    environment:
      # ZOO_PORT_NUMBER: ZooKeeper client port. Default: 2181
      - ZOO_PORT_NUMBER=2181
      # ZOO_SERVER_ID: ID of the server in the ensemble. Default: 1
      - ZOO_SERVER_ID=1
      # ZOO_TICK_TIME: Basic time unit in milliseconds used by ZooKeeper for heartbeats. Default: 2000
      - ZOO_TICK_TIME=4000
      # ZOO_PRE_ALLOC_SIZE': Block size for transaction log file. Default 65536
      - ZOO_PRE_ALLOC_SIZE=65536
      # ZOO_SNAPCOUNT: The number of transactions recorded in the transaction log before a snapshot can be taken (and the transaction log rolled). Default 100000
      - ZOO_SNAPCOUNT=100000
      # ZOO_INIT_LIMIT: ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader. Default: 10
      - ZOO_INIT_LIMIT=10
      # ZOO_SYNC_LIMIT: How far out of date a server can be from a leader. Default: 5
      - ZOO_SYNC_LIMIT=5
      # ZOO_MAX_CNXNS: Limits the total number of concurrent connections that can be made to a ZooKeeper server. Setting it to 0 entirely removes the limit. Default: 0
      - ZOO_MAX_CNXNS=0
      # ZOO_MAX_CLIENT_CNXNS: Limits the number of concurrent connections that a single client may make to a single member of the ZooKeeper ensemble. Default 60
      - ZOO_MAX_CLIENT_CNXNS=60
      # ZOO_4LW_COMMANDS_WHITELIST: List of whitelisted 4LW commands. Default srvr, mntr
      - ZOO_4LW_COMMANDS_WHITELIST=*
      # ZOO_SERVERS: Comma, space or semi-colon separated list of servers. Example: zoo1:2888:3888,zoo2:2888:3888 or if specifying server IDs zoo1:2888:3888::1,zoo2:2888:3888::2. No defaults.
      - ZOO_SERVERS=zookeeper1:2888:3888::1,zookeeper2:2888:3888::2,zookeeper3:2888:3888::3
      # ZOO_CLIENT_USER: User that will use ZooKeeper clients to auth. Default: No defaults.
      - ZOO_CLIENT_USER=admin
      # ZOO_CLIENT_PASSWORD: Password that will use ZooKeeper clients to auth. No defaults.
      - ZOO_CLIENT_PASSWORD=Password01
      # ZOO_CLIENT_PASSWORD_FILE: Absolute path to a file that contains the password that will be used by ZooKeeper clients to perform authentication. No defaults.
      #- ZOO_CLIENT_PASSWORD_FILE=
      # ZOO_SERVER_USERS: Comma, semicolon or whitespace separated list of user to be created. Example: user1,user2,admin. No defaults
      - ZOO_SERVER_USERS=admin
      # ZOO_SERVER_PASSWORDS: Comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      - ZOO_SERVER_PASSWORDS=Password01
      # ZOO_SERVER_PASSWORDS_FILE: Absolute path to a file that contains a comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      #- ZOO_SERVER_PASSWORDS_FILE=
      # ZOO_ENABLE_AUTH: Enable ZooKeeper auth. It uses SASL/Digest-MD5. Default: no
      - ZOO_ENABLE_AUTH=No
      # ZOO_RECONFIG_ENABLED: Enable ZooKeeper Dynamic Reconfiguration. Default: no
      - ZOO_RECONFIG_ENABLED=yes
      # ZOO_LISTEN_ALLIPS_ENABLED: Listen for connections from its peers on all available IP addresses. Default: no
      - ZOO_LISTEN_ALLIPS_ENABLED=no
      # ZOO_AUTOPURGE_INTERVAL: The time interval in hours for which the autopurge task is triggered. Set to a positive integer (1 and above) to enable auto purging of old snapshots and log files. Default: 0
      - ZOO_AUTOPURGE_INTERVAL=0
      # ZOO_MAX_SESSION_TIMEOUT: Maximum session timeout in milliseconds that the server will allow the client to negotiate. Default: 40000
      - ZOO_MAX_SESSION_TIMEOUT=40000
      # ZOO_AUTOPURGE_RETAIN_COUNT: When auto purging is enabled, ZooKeeper retains the most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively to this number and deletes the rest. Minimum value is 3. Default: 3
      - ZOO_AUTOPURGE_RETAIN_COUNT=3
      # ZOO_HEAP_SIZE: Size in MB for the Java Heap options (Xmx and XMs). This env var is ignored if Xmx an Xms are configured via JVMFLAGS. Default: 1024
      - ZOO_HEAP_SIZE=1024
      # ZOO_ENABLE_PROMETHEUS_METRICS: Expose Prometheus metrics. Default: no
      - ZOO_ENABLE_PROMETHEUS_METRICS=yes
      # ZOO_PROMETHEUS_METRICS_PORT_NUMBER: Port where a Jetty server will expose Prometheus metrics. Default: 7000
      - ZOO_PROMETHEUS_METRICS_PORT_NUMBER=7000
      # ALLOW_ANONYMOUS_LOGIN: If set to true, Allow to accept connections from unauthenticated users. Default: no
      - ALLOW_ANONYMOUS_LOGIN=yes
      # ZOO_LOG_LEVEL: ZooKeeper log level. Available levels are: ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE. Default: INFO
      - ZOO_LOG_LEVEL=ALL
      # JVMFLAGS: Default JVMFLAGS for the ZooKeeper process. No defaults
      #- JVMFLAGS=
      # ZOO_TLS_CLIENT_ENABLE: Enable tls for client communication. Default: false
      - ZOO_TLS_CLIENT_ENABLE=false
      # ZOO_TLS_PORT_NUMBER: Zookeeper TLS port. Default: 3181
      #- ZOO_TLS_PORT_NUMBER=3181
      # ZOO_TLS_CLIENT_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_FILE=
      # ZOO_TLS_CLIENT_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_FILE=
      # ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_CLIENT_AUTH=none
      # ZOO_TLS_QUORUM_ENABLE: Enable tls for quorum communication. Default: false
      - ZOO_TLS_QUORUM_ENABLE= false
      # ZOO_TLS_QUORUM_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_FILE=
      # ZOO_TLS_QUORUM_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_FILE=
      # ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_QUORUM_CLIENT_AUTH=none
      # ###### New parameters
      #     ssl.trustStore.type=JKS
      #- ZOO_TLS_CLIENT_TRUSTSTORE_TYPE=
      #     ssl.quorum.trustStore.type=JKS      
      #- ZOO_TLS_QUORUM_TRUSTSTORE_TYPE=
  zookeeper2:
    container_name: zookeeper2
    image: docker.io/bitnami/zookeeper:3.7
    hostname: zookeeper2
    restart: always
    ports:
      - '2181'
      - '2888'
      - '3888'
    volumes:
      - ./zookeeper2_data:/data
    networks:
      - kafka-net1
    environment:
      # ZOO_PORT_NUMBER: ZooKeeper client port. Default: 2181
      - ZOO_PORT_NUMBER=2181
      # ZOO_SERVER_ID: ID of the server in the ensemble. Default: 1
      - ZOO_SERVER_ID=2
      # ZOO_TICK_TIME: Basic time unit in milliseconds used by ZooKeeper for heartbeats. Default: 2000
      - ZOO_TICK_TIME=4000
      # ZOO_PRE_ALLOC_SIZE': Block size for transaction log file. Default 65536
      - ZOO_PRE_ALLOC_SIZE=65536
      # ZOO_SNAPCOUNT: The number of transactions recorded in the transaction log before a snapshot can be taken (and the transaction log rolled). Default 100000
      - ZOO_SNAPCOUNT=100000
      # ZOO_INIT_LIMIT: ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader. Default: 10
      - ZOO_INIT_LIMIT=10
      # ZOO_SYNC_LIMIT: How far out of date a server can be from a leader. Default: 5
      - ZOO_SYNC_LIMIT=5
      # ZOO_MAX_CNXNS: Limits the total number of concurrent connections that can be made to a ZooKeeper server. Setting it to 0 entirely removes the limit. Default: 0
      - ZOO_MAX_CNXNS=0
      # ZOO_MAX_CLIENT_CNXNS: Limits the number of concurrent connections that a single client may make to a single member of the ZooKeeper ensemble. Default 60
      - ZOO_MAX_CLIENT_CNXNS=60
      # ZOO_4LW_COMMANDS_WHITELIST: List of whitelisted 4LW commands. Default srvr, mntr
      - ZOO_4LW_COMMANDS_WHITELIST=*
      # ZOO_SERVERS: Comma, space or semi-colon separated list of servers. Example: zoo1:2888:3888,zoo2:2888:3888 or if specifying server IDs zoo1:2888:3888::1,zoo2:2888:3888::2. No defaults.
      - ZOO_SERVERS=zookeeper1:2888:3888::1,zookeeper2:2888:3888::2,zookeeper3:2888:3888::3
      # ZOO_CLIENT_USER: User that will use ZooKeeper clients to auth. Default: No defaults.
      - ZOO_CLIENT_USER=admin
      # ZOO_CLIENT_PASSWORD: Password that will use ZooKeeper clients to auth. No defaults.
      - ZOO_CLIENT_PASSWORD=Password01
      # ZOO_CLIENT_PASSWORD_FILE: Absolute path to a file that contains the password that will be used by ZooKeeper clients to perform authentication. No defaults.
      #- ZOO_CLIENT_PASSWORD_FILE=
      # ZOO_SERVER_USERS: Comma, semicolon or whitespace separated list of user to be created. Example: user1,user2,admin. No defaults
      - ZOO_SERVER_USERS=admin
      # ZOO_SERVER_PASSWORDS: Comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      - ZOO_SERVER_PASSWORDS=Password01
      # ZOO_SERVER_PASSWORDS_FILE: Absolute path to a file that contains a comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      #- ZOO_SERVER_PASSWORDS_FILE=
      # ZOO_ENABLE_AUTH: Enable ZooKeeper auth. It uses SASL/Digest-MD5. Default: no
      - ZOO_ENABLE_AUTH=No
      # ZOO_RECONFIG_ENABLED: Enable ZooKeeper Dynamic Reconfiguration. Default: no
      - ZOO_RECONFIG_ENABLED=yes
      # ZOO_LISTEN_ALLIPS_ENABLED: Listen for connections from its peers on all available IP addresses. Default: no
      - ZOO_LISTEN_ALLIPS_ENABLED=no
      # ZOO_AUTOPURGE_INTERVAL: The time interval in hours for which the autopurge task is triggered. Set to a positive integer (1 and above) to enable auto purging of old snapshots and log files. Default: 0
      - ZOO_AUTOPURGE_INTERVAL=0
      # ZOO_MAX_SESSION_TIMEOUT: Maximum session timeout in milliseconds that the server will allow the client to negotiate. Default: 40000
      - ZOO_MAX_SESSION_TIMEOUT=40000
      # ZOO_AUTOPURGE_RETAIN_COUNT: When auto purging is enabled, ZooKeeper retains the most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively to this number and deletes the rest. Minimum value is 3. Default: 3
      - ZOO_AUTOPURGE_RETAIN_COUNT=3
      # ZOO_HEAP_SIZE: Size in MB for the Java Heap options (Xmx and XMs). This env var is ignored if Xmx an Xms are configured via JVMFLAGS. Default: 1024
      - ZOO_HEAP_SIZE=1024
      # ZOO_ENABLE_PROMETHEUS_METRICS: Expose Prometheus metrics. Default: no
      - ZOO_ENABLE_PROMETHEUS_METRICS=yes
      # ZOO_PROMETHEUS_METRICS_PORT_NUMBER: Port where a Jetty server will expose Prometheus metrics. Default: 7000
      - ZOO_PROMETHEUS_METRICS_PORT_NUMBER=7000
      # ALLOW_ANONYMOUS_LOGIN: If set to true, Allow to accept connections from unauthenticated users. Default: no
      - ALLOW_ANONYMOUS_LOGIN=yes
      # ZOO_LOG_LEVEL: ZooKeeper log level. Available levels are: ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE. Default: INFO
      - ZOO_LOG_LEVEL=ALL
      # JVMFLAGS: Default JVMFLAGS for the ZooKeeper process. No defaults
      #- JVMFLAGS=
      # ZOO_TLS_CLIENT_ENABLE: Enable tls for client communication. Default: false
      - ZOO_TLS_CLIENT_ENABLE=false
      # ZOO_TLS_PORT_NUMBER: Zookeeper TLS port. Default: 3181
      #- ZOO_TLS_PORT_NUMBER=3181
      # ZOO_TLS_CLIENT_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_FILE=
      # ZOO_TLS_CLIENT_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_FILE=
      # ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_CLIENT_AUTH=none
      # ZOO_TLS_QUORUM_ENABLE: Enable tls for quorum communication. Default: false
      - ZOO_TLS_QUORUM_ENABLE= false
      # ZOO_TLS_QUORUM_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_FILE=
      # ZOO_TLS_QUORUM_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_FILE=
      # ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_QUORUM_CLIENT_AUTH=none
      # ###### New parameters
      #     ssl.trustStore.type=JKS
      #- ZOO_TLS_CLIENT_TRUSTSTORE_TYPE=
      #     ssl.quorum.trustStore.type=JKS      
      #- ZOO_TLS_QUORUM_TRUSTSTORE_TYPE=
  zookeeper3:
    container_name: zookeeper3
    image: docker.io/bitnami/zookeeper:3.7
    hostname: zookeeper3
    restart: always
    ports:
      - '2181'
      - '2888'
      - '3888'
    volumes:
      - ./zookeeper3_data:/data
    networks:
      - kafka-net1
    environment:
      # ZOO_PORT_NUMBER: ZooKeeper client port. Default: 2181
      - ZOO_PORT_NUMBER=2181
      # ZOO_SERVER_ID: ID of the server in the ensemble. Default: 1
      - ZOO_SERVER_ID=3
      # ZOO_TICK_TIME: Basic time unit in milliseconds used by ZooKeeper for heartbeats. Default: 2000
      - ZOO_TICK_TIME=4000
      # ZOO_PRE_ALLOC_SIZE': Block size for transaction log file. Default 65536
      - ZOO_PRE_ALLOC_SIZE=65536
      # ZOO_SNAPCOUNT: The number of transactions recorded in the transaction log before a snapshot can be taken (and the transaction log rolled). Default 100000
      - ZOO_SNAPCOUNT=100000
      # ZOO_INIT_LIMIT: ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader. Default: 10
      - ZOO_INIT_LIMIT=10
      # ZOO_SYNC_LIMIT: How far out of date a server can be from a leader. Default: 5
      - ZOO_SYNC_LIMIT=5
      # ZOO_MAX_CNXNS: Limits the total number of concurrent connections that can be made to a ZooKeeper server. Setting it to 0 entirely removes the limit. Default: 0
      - ZOO_MAX_CNXNS=0
      # ZOO_MAX_CLIENT_CNXNS: Limits the number of concurrent connections that a single client may make to a single member of the ZooKeeper ensemble. Default 60
      - ZOO_MAX_CLIENT_CNXNS=60
      # ZOO_4LW_COMMANDS_WHITELIST: List of whitelisted 4LW commands. Default srvr, mntr
      - ZOO_4LW_COMMANDS_WHITELIST=*
      # ZOO_SERVERS: Comma, space or semi-colon separated list of servers. Example: zoo1:2888:3888,zoo2:2888:3888 or if specifying server IDs zoo1:2888:3888::1,zoo2:2888:3888::2. No defaults.
      - ZOO_SERVERS=zookeeper1:2888:3888::1,zookeeper2:2888:3888::2,zookeeper3:2888:3888::3
      # ZOO_CLIENT_USER: User that will use ZooKeeper clients to auth. Default: No defaults.
      - ZOO_CLIENT_USER=admin
      # ZOO_CLIENT_PASSWORD: Password that will use ZooKeeper clients to auth. No defaults.
      - ZOO_CLIENT_PASSWORD=Password01
      # ZOO_CLIENT_PASSWORD_FILE: Absolute path to a file that contains the password that will be used by ZooKeeper clients to perform authentication. No defaults.
      #- ZOO_CLIENT_PASSWORD_FILE=
      # ZOO_SERVER_USERS: Comma, semicolon or whitespace separated list of user to be created. Example: user1,user2,admin. No defaults
      - ZOO_SERVER_USERS=admin
      # ZOO_SERVER_PASSWORDS: Comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      - ZOO_SERVER_PASSWORDS=Password01
      # ZOO_SERVER_PASSWORDS_FILE: Absolute path to a file that contains a comma, semicolon or whitespace separated list of passwords to assign to users when created. Example: pass4user1, pass4user2, pass4admin. No defaults
      #- ZOO_SERVER_PASSWORDS_FILE=
      # ZOO_ENABLE_AUTH: Enable ZooKeeper auth. It uses SASL/Digest-MD5. Default: no
      - ZOO_ENABLE_AUTH=No
      # ZOO_RECONFIG_ENABLED: Enable ZooKeeper Dynamic Reconfiguration. Default: no
      - ZOO_RECONFIG_ENABLED=yes
      # ZOO_LISTEN_ALLIPS_ENABLED: Listen for connections from its peers on all available IP addresses. Default: no
      - ZOO_LISTEN_ALLIPS_ENABLED=no
      # ZOO_AUTOPURGE_INTERVAL: The time interval in hours for which the autopurge task is triggered. Set to a positive integer (1 and above) to enable auto purging of old snapshots and log files. Default: 0
      - ZOO_AUTOPURGE_INTERVAL=0
      # ZOO_MAX_SESSION_TIMEOUT: Maximum session timeout in milliseconds that the server will allow the client to negotiate. Default: 40000
      - ZOO_MAX_SESSION_TIMEOUT=40000
      # ZOO_AUTOPURGE_RETAIN_COUNT: When auto purging is enabled, ZooKeeper retains the most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively to this number and deletes the rest. Minimum value is 3. Default: 3
      - ZOO_AUTOPURGE_RETAIN_COUNT=3
      # ZOO_HEAP_SIZE: Size in MB for the Java Heap options (Xmx and XMs). This env var is ignored if Xmx an Xms are configured via JVMFLAGS. Default: 1024
      - ZOO_HEAP_SIZE=1024
      # ZOO_ENABLE_PROMETHEUS_METRICS: Expose Prometheus metrics. Default: no
      - ZOO_ENABLE_PROMETHEUS_METRICS=yes
      # ZOO_PROMETHEUS_METRICS_PORT_NUMBER: Port where a Jetty server will expose Prometheus metrics. Default: 7000
      - ZOO_PROMETHEUS_METRICS_PORT_NUMBER=7000
      # ALLOW_ANONYMOUS_LOGIN: If set to true, Allow to accept connections from unauthenticated users. Default: no
      - ALLOW_ANONYMOUS_LOGIN=yes
      # ZOO_LOG_LEVEL: ZooKeeper log level. Available levels are: ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE. Default: INFO
      - ZOO_LOG_LEVEL=ALL
      # JVMFLAGS: Default JVMFLAGS for the ZooKeeper process. No defaults
      #- JVMFLAGS=
      # ZOO_TLS_CLIENT_ENABLE: Enable tls for client communication. Default: false
      - ZOO_TLS_CLIENT_ENABLE=false
      # ZOO_TLS_PORT_NUMBER: Zookeeper TLS port. Default: 3181
      #- ZOO_TLS_PORT_NUMBER=3181
      # ZOO_TLS_CLIENT_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_FILE=
      # ZOO_TLS_CLIENT_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_KEYSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_FILE=
      # ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_CLIENT_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_CLIENT_AUTH=none
      # ZOO_TLS_QUORUM_ENABLE: Enable tls for quorum communication. Default: false
      - ZOO_TLS_QUORUM_ENABLE= false
      # ZOO_TLS_QUORUM_KEYSTORE_FILE: KeyStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_FILE=
      # ZOO_TLS_QUORUM_KEYSTORE_PASSWORD: KeyStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_KEYSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_TRUSTSTORE_FILE: TrustStore file: Default: No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_FILE=
      # ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD: TrustStore file password. This can be an environment variable. It will be evaluated by bash. No Defaults
      #- ZOO_TLS_QUORUM_TRUSTSTORE_PASSWORD=
      # ZOO_TLS_QUORUM_CLIENT_AUTH: Specifies options to authenticate TLS connections from clients. Available values are: none, want, need. Default: need
      - ZOO_TLS_QUORUM_CLIENT_AUTH=none
      # ###### New parameters
      #     ssl.trustStore.type=JKS
      #- ZOO_TLS_CLIENT_TRUSTSTORE_TYPE=
      #     ssl.quorum.trustStore.type=JKS      
      #- ZOO_TLS_QUORUM_TRUSTSTORE_TYPE=
  kafka1:
    container_name: kafka1
    image: docker.io/bitnami/kafka:latest
    hostname: kafka1
    restart: "no"
    ports:
      - 9092:9092
    volumes:
      - ./kafka1_data:/data
    networks:
      - kafka-net1
    links:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    depends_on:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    environment:
      # ALLOW_PLAINTEXT_LISTENER: Allow to use the PLAINTEXT listener. Default: no.
      - ALLOW_PLAINTEXT_LISTENER=yes
      # KAFKA_INTER_BROKER_USER: Kafka inter broker communication user. Default: admin. Default: user.
      #- KAFKA_INTER_BROKER_USER=
      # KAFKA_INTER_BROKER_PASSWORD: Kafka inter broker communication password. Default: bitnami.
      #- KAFKA_INTER_BROKER_PASSWORD=
      # KAFKA_CERTIFICATE_PASSWORD: Password for certificates. No defaults.
      #- KAFKA_CERTIFICATE_PASSWORD=
      # KAFKA_HEAP_OPTS: Kafka's Java Heap size. Default: -Xmx1024m -Xms1024m.
      #- KAFKA_HEAP_OPTS="-Xmx1024m -Xms1024m"
      # KAFKA_ZOOKEEPER_PROTOCOL: Authentication protocol for Zookeeper connections. Allowed protocols: PLAINTEXT, SASL, SSL, and SASL_SSL. Defaults: PLAINTEXT.
      - KAFKA_ZOOKEEPER_PROTOCOL=PLAINTEXT
      # KAFKA_ZOOKEEPER_USER: Kafka Zookeeper user for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_USER=
      # KAFKA_ZOOKEEPER_PASSWORD: Kafka Zookeeper user password for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD: Kafka Zookeeper keystore file password and key password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD: Kafka Zookeeper truststore file password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME: Verify Zookeeper hostname on TLS certificates. Defaults: true.
      - KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME=false
      # KAFKA_ZOOKEEPER_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_ZOOKEEPER_TLS_TYPE=
      # KAFKA_CFG_SASL_ENABLED_MECHANISMS: Allowed mechanism when using SASL either for clients, inter broker, or zookeeper comunications. Allowed values: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 or a comma separated combination of those values. Default: PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      - KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      # KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL: SASL mechanism to use for inter broker communications. No defaults.
      - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN
      # KAFKA_CFG_TLS_CLIENT_AUTH: Configures kafka brokers to request client authentication. Allowed values: required, requested, none. Defaults: required.
      - KAFKA_CFG_TLS_CLIENT_AUTH=none
      # KAFKA_CFG_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_CFG_TLS_TYPE=
      # KAFKA_CLIENT_USERS: Additional users to KAFKA_CLIENT_USER that will be created into Zookeeper when using SASL_SCRAM for client communications. Separated by commas. Default: user
      #- KAFKA_CLIENT_USERS=
      # KAFKA_CLIENT_PASSWORDS: Passwords for the users specified atKAFKA_CLIENT_USERS. Separated by commas. Default: bitnami
      #- KAFKA_CLIENT_PASSWORDS=
      # KAFKA_CFG_MAX_PARTITION_FETCH_BYTES: The maximum amount of data per-partition the server will return. Default: 1048576
      - KAFKA_CFG_MAX_PARTITION_FETCH_BYTES=1048576
      # KAFKA_CFG_MAX_REQUEST_SIZE: The maximum size of a request in bytes. Default: 1048576
      - KAFKA_CFG_MAX_REQUEST_SIZE=1048576
      # Additionally, any environment variable beginning with KAFKA_CFG_ will be mapped to its corresponding Kafka key. 
      # For example, use KAFKA_CFG_BACKGROUND_THREADS in order to set background.threads or KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE in order to configure auto.create.topics.enable.
      - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
      ########
      - KAFKA_CFG_ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT
      - KAFKA_CFG_LISTENERS=INTERNAL://:9092
      - KAFKA_CFG_ADVERTISED_LISTENERS=INTERNAL://kafka1:9092
      - KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
      #- KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM=""
      - KAFKA_CFG_BROKER_ID=1
      ### zookeeper.ssl.client
      #- KAFKA_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_SSL_CLIENT_ENABLE=true
  kafka2:
    container_name: kafka2
    image: docker.io/bitnami/kafka:latest
    hostname: kafka2
    restart: "no"
    ports:
      - 9093:9093
    volumes:
      - ./kafka2_data:/data
    networks:
      - kafka-net1
    links:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    depends_on:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    environment:
      # ALLOW_PLAINTEXT_LISTENER: Allow to use the PLAINTEXT listener. Default: no.
      - ALLOW_PLAINTEXT_LISTENER=yes
      # KAFKA_INTER_BROKER_USER: Kafka inter broker communication user. Default: admin. Default: user.
      #- KAFKA_INTER_BROKER_USER=
      # KAFKA_INTER_BROKER_PASSWORD: Kafka inter broker communication password. Default: bitnami.
      #- KAFKA_INTER_BROKER_PASSWORD=
      # KAFKA_CERTIFICATE_PASSWORD: Password for certificates. No defaults.
      #- KAFKA_CERTIFICATE_PASSWORD=
      # KAFKA_HEAP_OPTS: Kafka's Java Heap size. Default: -Xmx1024m -Xms1024m.
      #- KAFKA_HEAP_OPTS="-Xmx1024m -Xms1024m"
      # KAFKA_ZOOKEEPER_PROTOCOL: Authentication protocol for Zookeeper connections. Allowed protocols: PLAINTEXT, SASL, SSL, and SASL_SSL. Defaults: PLAINTEXT.
      - KAFKA_ZOOKEEPER_PROTOCOL=PLAINTEXT
      # KAFKA_ZOOKEEPER_USER: Kafka Zookeeper user for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_USER=
      # KAFKA_ZOOKEEPER_PASSWORD: Kafka Zookeeper user password for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD: Kafka Zookeeper keystore file password and key password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD: Kafka Zookeeper truststore file password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME: Verify Zookeeper hostname on TLS certificates. Defaults: true.
      - KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME=false
      # KAFKA_ZOOKEEPER_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_ZOOKEEPER_TLS_TYPE=
      # KAFKA_CFG_SASL_ENABLED_MECHANISMS: Allowed mechanism when using SASL either for clients, inter broker, or zookeeper comunications. Allowed values: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 or a comma separated combination of those values. Default: PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      - KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      # KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL: SASL mechanism to use for inter broker communications. No defaults.
      - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN
      # KAFKA_CFG_TLS_CLIENT_AUTH: Configures kafka brokers to request client authentication. Allowed values: required, requested, none. Defaults: required.
      - KAFKA_CFG_TLS_CLIENT_AUTH=none
      # KAFKA_CFG_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_CFG_TLS_TYPE=
      # KAFKA_CLIENT_USERS: Additional users to KAFKA_CLIENT_USER that will be created into Zookeeper when using SASL_SCRAM for client communications. Separated by commas. Default: user
      #- KAFKA_CLIENT_USERS=
      # KAFKA_CLIENT_PASSWORDS: Passwords for the users specified atKAFKA_CLIENT_USERS. Separated by commas. Default: bitnami
      #- KAFKA_CLIENT_PASSWORDS=
      # KAFKA_CFG_MAX_PARTITION_FETCH_BYTES: The maximum amount of data per-partition the server will return. Default: 1048576
      - KAFKA_CFG_MAX_PARTITION_FETCH_BYTES=1048576
      # KAFKA_CFG_MAX_REQUEST_SIZE: The maximum size of a request in bytes. Default: 1048576
      - KAFKA_CFG_MAX_REQUEST_SIZE=1048576
      # Additionally, any environment variable beginning with KAFKA_CFG_ will be mapped to its corresponding Kafka key. 
      # For example, use KAFKA_CFG_BACKGROUND_THREADS in order to set background.threads or KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE in order to configure auto.create.topics.enable.
      - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
      ########
      - KAFKA_CFG_ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT
      - KAFKA_CFG_LISTENERS=INTERNAL://:9093
      - KAFKA_CFG_ADVERTISED_LISTENERS=INTERNAL://kafka2:9093
      - KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
      #- KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM=""
      - KAFKA_CFG_BROKER_ID=2
      ### zookeeper.ssl.client
      #- KAFKA_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_SSL_CLIENT_ENABLE=true
  kafka3:
    container_name: kafka3
    image: docker.io/bitnami/kafka:latest
    hostname: kafka3
    restart: "no"
    ports:
      - 9091:9091
    volumes:
      - ./kafka3_data:/data
    networks:
      - kafka-net1
    links:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    depends_on:
      - zookeeper1
      - zookeeper2
      - zookeeper3
    environment:
      # ALLOW_PLAINTEXT_LISTENER: Allow to use the PLAINTEXT listener. Default: no.
      - ALLOW_PLAINTEXT_LISTENER=yes
      # KAFKA_INTER_BROKER_USER: Kafka inter broker communication user. Default: admin. Default: user.
      #- KAFKA_INTER_BROKER_USER=
      # KAFKA_INTER_BROKER_PASSWORD: Kafka inter broker communication password. Default: bitnami.
      #- KAFKA_INTER_BROKER_PASSWORD=
      # KAFKA_CERTIFICATE_PASSWORD: Password for certificates. No defaults.
      #- KAFKA_CERTIFICATE_PASSWORD=
      # KAFKA_HEAP_OPTS: Kafka's Java Heap size. Default: -Xmx1024m -Xms1024m.
      #- KAFKA_HEAP_OPTS="-Xmx1024m -Xms1024m"
      # KAFKA_ZOOKEEPER_PROTOCOL: Authentication protocol for Zookeeper connections. Allowed protocols: PLAINTEXT, SASL, SSL, and SASL_SSL. Defaults: PLAINTEXT.
      - KAFKA_ZOOKEEPER_PROTOCOL=PLAINTEXT
      # KAFKA_ZOOKEEPER_USER: Kafka Zookeeper user for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_USER=
      # KAFKA_ZOOKEEPER_PASSWORD: Kafka Zookeeper user password for SASL authentication. No defaults.
      #- KAFKA_ZOOKEEPER_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD: Kafka Zookeeper keystore file password and key password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_KEYSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD: Kafka Zookeeper truststore file password. No defaults.
      #- KAFKA_ZOOKEEPER_TLS_TRUSTSTORE_PASSWORD=
      # KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME: Verify Zookeeper hostname on TLS certificates. Defaults: true.
      - KAFKA_ZOOKEEPER_TLS_VERIFY_HOSTNAME=false
      # KAFKA_ZOOKEEPER_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_ZOOKEEPER_TLS_TYPE=
      # KAFKA_CFG_SASL_ENABLED_MECHANISMS: Allowed mechanism when using SASL either for clients, inter broker, or zookeeper comunications. Allowed values: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 or a comma separated combination of those values. Default: PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      - KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN,SCRAM-SHA-256,SCRAM-SHA-512
      # KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL: SASL mechanism to use for inter broker communications. No defaults.
      - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN
      # KAFKA_CFG_TLS_CLIENT_AUTH: Configures kafka brokers to request client authentication. Allowed values: required, requested, none. Defaults: required.
      - KAFKA_CFG_TLS_CLIENT_AUTH=none
      # KAFKA_CFG_TLS_TYPE: Choose the TLS certificate format to use. Allowed values: JKS, PEM. Defaults: JKS.
      #- KAFKA_CFG_TLS_TYPE=
      # KAFKA_CLIENT_USERS: Additional users to KAFKA_CLIENT_USER that will be created into Zookeeper when using SASL_SCRAM for client communications. Separated by commas. Default: user
      #- KAFKA_CLIENT_USERS=
      # KAFKA_CLIENT_PASSWORDS: Passwords for the users specified atKAFKA_CLIENT_USERS. Separated by commas. Default: bitnami
      #- KAFKA_CLIENT_PASSWORDS=
      # KAFKA_CFG_MAX_PARTITION_FETCH_BYTES: The maximum amount of data per-partition the server will return. Default: 1048576
      - KAFKA_CFG_MAX_PARTITION_FETCH_BYTES=1048576
      # KAFKA_CFG_MAX_REQUEST_SIZE: The maximum size of a request in bytes. Default: 1048576
      - KAFKA_CFG_MAX_REQUEST_SIZE=1048576
      # Additionally, any environment variable beginning with KAFKA_CFG_ will be mapped to its corresponding Kafka key. 
      # For example, use KAFKA_CFG_BACKGROUND_THREADS in order to set background.threads or KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE in order to configure auto.create.topics.enable.
      - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
      ########
      - KAFKA_CFG_ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT
      - KAFKA_CFG_LISTENERS=INTERNAL://:9091
      - KAFKA_CFG_ADVERTISED_LISTENERS=INTERNAL://kafka3:9091
      - KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
      #- KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM=""
      - KAFKA_CFG_BROKER_ID=3
      ### zookeeper.ssl.client
      #- KAFKA_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_TLS_CLIENT_ENABLE=true
      #- KAFKA_CFG_ZOOKEEPER_SSL_CLIENT_ENABLE=true
  kafdrop:
    container_name: kafdrop
    image: obsidiandynamics/kafdrop
    hostname: kafdrop
    restart: "no"
    ports:
      - "9000:9000"
    volumes:
      - ./kafdrop_data:/data 
      - './properties/kafka.properties:/kafka.properties:ro'
    networks:
      - kafka-net1
    links:
      - kafka1
      - kafka2
      - kafka3
    depends_on:
      - kafka1
      - kafka2
      - kafka3
    environment:
      - KAFKA_BROKERCONNECT=kafka1:9092,kafka2:9093,kafka3:9091
      - KAFKA_PROPERTIES_FILE=/kafka.properties
  mysql_source:
    container_name: mysql_source
    image: mysql
    hostname: mysql_source
    restart: "no"
    ports:
      - "3306:3306"
    volumes:
      #- ./mysql_data:/var/lib/mysql
      - ./mysql_source_data:/data
      - ./mysql_script/mysqldatabase.sql:/docker-entrypoint-initdb.d/mysqldatabase.sql
      - ./secrets:/run/secrets
    networks:
      - kafka-net1
    environment:
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
      - MYSQL_USER=sqluser
      - MYSQL_PASSWORD_FILE=/run/secrets/mysql_user_password
  connect_source:
    container_name: connect_source
    image: debeziumsinkconnect
    hostname: connect_source
    restart: "no"
    ports:
      - "8083:8083"
    volumes:
      - ./connect_source_data:/data
    networks:
      - kafka-net1
    links:
      - kafka1
      - kafka2
      - kafka3
      - mysql_source
    depends_on:
      - kafka1
      - kafka2
      - kafka3
      - mysql_source
    environment:
# Environment variables that start with CONNECT_ will be used to update the Kafka Connect worker configuration file. Each environment variable name will be mapped to a configuration property name by:
#
#   removing the CONNECT_ prefix;
#   lowercasing all characters; and
#   converting all '_' characters to '.' characters
# For example, the environment variable CONNECT__HEARTBEAT_INTERVAL_MS is converted to the heartbeat.interval.ms property. The container will then update the Kafka Connect worker configuration file to include the property's name and value.
#
# The value of the environment variable may not contain a '@' character.
      - GROUP_ID=1
      - CONFIG_STORAGE_TOPIC=connect_config
      - OFFSET_STORAGE_TOPIC=connect_offsets
      - BOOTSTRAP_SERVERS=kafka1:9092,kafka2:9093,kafka3:9091
      #- HOST_NAME=connect_source
      #- ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
      #- ADVERTISED_PORT=8093
      - KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
      - VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter
      - INTERNAL_KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
      - INTERNAL_VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter
      - OFFSET_FLUSH_INTERVAL_MS=60000
      - OFFSET_FLUSH_TIMEOUT_MS=5000
      - SHUTDOWN_TIMEOUT=10000
      #- HEAP_OPTS="-Xms256M -Xmx2G"
      - LOG_LEVEL=DEBUG
      - ENABLE_APICURIO_CONVERTERS=false
      #- ENABLE_DEBEZIUM_SCRIPTING=false
      - STATUS_STORAGE_TOPIC=connect_statuses
  schemaRegistry:
    container_name: schemaRegistry
    image: confluentinc/cp-schema-registry
    hostname: schemaRegistry
    restart: "no"
    ports:
      - 8181:8181
      - 8081:8081
    volumes:
      - ./schemaRegsitry_data:/data 
    networks:
      - kafka-net1
    links:
      - kafka1
      - kafka2
      - kafka3
    depends_on:
      - kafka1
      - kafka2
      - kafka3
    environment:
      #- SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
      - SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=kafka1:9092,kafka2:9093,kafka3:9091
      - SCHEMA_REGISTRY_HOST_NAME=schemaRegistry
      - SCHEMA_REGISTRY_LISTENERS=http://schemaRegistry:8081
      - SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_METHODS=GET,POST,PUT,OPTIONS
      - SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_ORIGIN=*
      #- SCHEMA_REGISTRY_KAFKASTORE_TOPIC="schema-changes.classicmodels"
  schemaRegistryUI:
    container_name: schemaRegistryUI
    image: landoop/schema-registry-ui
    hostname: schemaRegistryUI
    restart: "no"
    ports:
      - 8000:8000
    volumes:
      - ./schemaRegsitryUI_data:/data 
    networks:
      - kafka-net1
    links:
      - schemaRegistry
    environment:
      - SCHEMAREGISTRY_URL=http://schemaRegistry:8081
      - PROXY=true
  postgres_target:
    container_name: postgres_target
    image: postgres
    hostname: postgres_target
    restart: "no"
    ports:
      - "8082:8082"
    volumes:
      - ./postgres_target_data:/data
      - ./secrets:/run/secrets
    networks:
      - kafka-net1
    environment:
      - POSTGRES_PASSWORD_FILE=run/secrets/postgres_user_password
      - POSTGRES_USER=admin
      - POSTGRES_DB=replicaDB
      - POSTGRES_SCHEMA=classicmodels
  debeziumUI:
    container_name: debeziumUI
    image: debezium/debezium-ui
    hostname: debeziumUI
    restart: "no"
    ports:
      - "8180:8080"
    expose:
      - "8081"
    volumes:
      - ./debeziumUI_data:/data 
    networks:
      - kafka-net1
    links:
      - connect_source
    depends_on:
      - connect_source
    environment: 
      - KAFKA_CONNECT_URI=http://connect_source:8083
  nifi:
    container_name: nifi
    image: apache/nifi:latest
    hostname: nifi
    restart: "no"
    ports:
      - 8080 # Unsecured HTTP Web Port
      - 8082
      - 9001
    volumes:
      - ./nifi_data:/data
    networks:
      - kafka-net1
    links:
      - connect_source
    depends_on:
      - connect_source
    environment:
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_CLUSTER_IS_NODE=true
      - NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
      - NIFI_ELECTION_MAX_WAIT=1 min
 
 
 
 
 
 
 
 
 






