services:

    # Influx DB
    influxdb:
        image: influxdb:2.0.7
        container_name: ota-ng-influxdb
        restart: always
        volumes:
            - /root/oi24/nfcollector/vendors/influxdb:/var/lib/influxdb2
        ports:
            - "8086:8086"
            - "8082:8082"
            - "8089:8089"

    # Grafana
    grafana:
        image: grafana/grafana:7.5.0
        container_name: ota-ng-grafana
        restart: always
        volumes:
            - /root/oi24/nfcollector/vendors/grafana:/var/lib/grafana
        ports:
            - "3000:3000"

    # Netflow Collector
    nfcolector:
        image: javadmohebbi/gonfcollector
        container_name: ota-ng-nfcollector
        restart: always
        volumes:
            - /root/oi24/nfcollector/bin:/opt/nfcollector/bin
            - /root/oi24/nfcollector/etc:/opt/nfcollector/etc
            - /root/oi24/nfcollector/var:/opt/nfcollector/var
            - /root/oi24/nfcollector/vendors:/opt/nfcollector/vendors
        ports:
            - "6859:6859/udp"
        environment:
           - NFC_DEBUG=true
           - NFC_CPU_NUM=0 # total number of cpu nfcollector could use
           - NFC_LISTEN_ADDRESS=0.0.0.0
           - NFC_LISTEN_PORT=6859
           - NFC_INFLUXDB_HOST=influxdb
           - NFC_INFLUXDB_PORT=8086
           - NFC_INFLUXDB_TOKEN=5vqt0q0b4g_lZwNgp7-8GgPq5Nxf3YY37xbVZP_ypeK_G3dwdNlTrAkcKN_Q6QzbmG-Th96lT_65Kp0j2UD1HA==
           - NFC_INFLUXDB_BUCKET=nfCollector
           - NFC_INFLUXDB_ORG=OPENINTELLIGENCE
           - NFC_IP_REPTATION_IPSUM=/opt/nfcollector/vendors/ipsum/ipsum.txt
           - NFC_IP2L_ASN=/opt/nfcollector/vendors/ip2location/db/IP2LOCATION-LITE-ASN.IPV6.CSV/IP2LOCATION-LITE-ASN.IPV6.CSV
           - NFC_IP2L_IP=/opt/nfcollector/vendors/ip2location/db/IP2LOCATION-LITE-DB11.IPV6.BIN/IP2LOCATION-LITE-DB11.IPV6.BIN
           - NFC_IP2L_PROXY=/opt/nfcollector/vendors/ip2location/db/IP2PROXY-LITE-PX10.IPV6.CSV/IP2PROXY-LITE-PX10.IPV6.CSV
           - NFC_IP2L_LOCAL=/opt/nfcollector/vendors/ip2location/local-db/local.csv
           - NFC_SOCK_PATH=/opt/nfcollector/var/socket/fw.socket

