version: '3'
services:
  ldap:
    hostname: ldap
    container_name: ldap
    image: "demo-ldap" #"openmicroscopy/apacheds"
    ports:
      - "389:10389"
    tty: true
    stdin_open: true
    volumes:
      - /opt/demo/ldap:/opt/demo/ldap:ro
  nifi:
    hostname: demo.nifi
    container_name: demo-nifi-1
    image: "apache/nifi:latest"
    environment:
      - AUTH=tls
      - KEYSTORE_PATH=/opt/demo/demo.nifi/keystore.jks
      - KEYSTORE_TYPE=JKS
      - KEYSTORE_PASSWORD=7sbPOUHNoj22SIEVdYXXkwhhFpdgbzLUaf3QOb4cCz8
      - TRUSTSTORE_PATH=/opt/demo/demo.nifi/truststore.jks
      - TRUSTSTORE_PASSWORD=MX7z6ZpBuLLYriL89zWdSWf5MKG32jAwB6gV3O+zHP8
      - TRUSTSTORE_TYPE=JKS
      - INITIAL_ADMIN_IDENTITY='CN=initialAdmin, OU=NIFI'
      - LDAP_AUTHENTICATION_STRATEGY='SIMPLE'
      - LDAP_MANAGER_DN='uid=admin,ou=system'
      - LDAP_MANAGER_PASSWORD='secret'
      - LDAP_USER_SEARCH_BASE='ou=people,dc=nifi,dc=com'
      - LDAP_USER_SEARCH_FILTER='uid={0}'
      - LDAP_IDENTITY_STRATEGY='USE_USERNAME'
      - LDAP_URL='ldap://ldap:10389'
      - NIFI_WEB_HTTP_HOST=demo.nifi
      - NIFI_WEB_HTTP_PORT=8888
    depends_on:
      - ldap
    links:
      - ldap
    ports:
      - "8888:8888"
      - "8443:8443"
    volumes:
      - /opt/demo/demo.nifi:/opt/demo/demo.nifi
