services:

  init-nifi-mini-cpp:
    image: apache/nifi-minifi-cpp:0.99.1
    entrypoint: ["sh", "-c"]
    command: ["test -f /tmp/minifi.properties || cp -v /opt/minifi/minifi-current/conf/* /tmp"]
    volumes:
      - init-nifi-mini-cpp-conf:/opt/minifi/minifi-current
      - ./data/conf:/tmp

  nifi-minifi-cpp:
    image: apache/nifi-minifi-cpp:0.99.1
    ports:
      - "8080:8080"
    volumes:
      - ./data/conf:/opt/minifi-cpp/conf
      - ./data/logs:/opt/minifi-cpp/logs
    depends_on:
      - init-nifi-mini-cpp
    restart: unless-stopped

volumes:
  init-nifi-mini-cpp-conf:
