version: "3"
services:
  zookeeper:
    hostname: zookeeper
    container_name: zookeeper
    image: 'bitnami/zookeeper:latest'
    ports:
      - '2181:2181'
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  node1.nifi:
    image: nifi-temp-cluster #apache/nifi:1.6.0-cluster
    container_name: node1.nifi
    hostname: node1.nifi
    links:
      - zookeeper
    ports:
      - 8080:8080
    environment:
      - NIFI_WEB_HTTP_HOST=node1.nifi
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_IS_CLUSTER=true
      - NIFI_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
  node2.nifi:
    image: nifi-temp-cluster #apache/nifi:1.6.0-cluster
    container_name: node2.nifi
    hostname: node2.nifi
    links:
      - zookeeper
      - node1.nifi
    ports:
      - 8888:8080
    environment:
      - NIFI_WEB_HTTP_HOST=node2.nifi
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_IS_CLUSTER=true
      - NIFI_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
  node3.nifi:
    image: nifi-temp-cluster #apache/nifi:1.6.0-cluster
    container_name: node3.nifi
    hostname: node3.nifi
    ports:
      - 8999:8080
    links:
      - zookeeper
      - node1.nifi
      - node2.nifi
    environment:
      - NIFI_WEB_HTTP_HOST=node3.nifi
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_IS_CLUSTER=true
      - NIFI_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
