Created
May 5, 2023 19:48
-
-
Save tomasdanjonsson/4bda32ebcc5595a62c19649201dc9825 to your computer and use it in GitHub Desktop.
docker-compose.yml for ElasticSearch 8.7.1, Kibana 8.7.1 and Apache NiFi 1.19.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
# Elasticsearch service | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.1 | |
hostname: elasticsearch | |
container_name: elasticsearchCS | |
environment: | |
- discovery.type=single-node # Run Elasticsearch as a single-node cluster | |
- xpack.security.enabled=false # Disable X-Pack security features | |
ports: | |
- '9200:9200' # Expose the HTTP API port | |
volumes: | |
- es_data:/usr/share/elasticsearch/data | |
networks: | |
- elk_nifi_network | |
# Kibana service | |
kibana: | |
image: docker.elastic.co/kibana/kibana:8.7.1 | |
hostname: kibana | |
container_name: kibanaCS | |
environment: | |
- ELASTICSEARCH_USERNAME=cybersift | |
- ELASTICSEARCH_PASSWORD=changeme | |
- xpack.security.enabled=false # Disable X-Pack security features | |
- elasticsearch.hosts=http://elasticsearch:9200 # Connect to the Elasticsearch service | |
ports: | |
- '5601:5601' # Expose the Kibana web interface port | |
volumes: | |
- kibana_config:/usr/share/kibana/config | |
networks: | |
- elk_nifi_network | |
depends_on: | |
- elasticsearch # Make sure Elasticsearch starts first | |
# Apache NiFi service | |
nifi: | |
image: apache/nifi:1.19.0 | |
container_name: nifiCS | |
restart: always # Restart the container if it crashes or stops | |
ports: | |
- '8080:8080' # Expose the NiFi web interface port | |
- '514:514/udp' # Expose the syslog UDP port (if needed for your use case) | |
volumes: | |
- nifi_conf:/opt/nifi/nifi-current/conf # Persist NiFi configuration | |
- nifi_flowfile:/opt/nifi/nifi-current/flowfile_repository # Persist NiFi flowfile repository | |
environment: | |
NIFI_WEB_HTTP_HOST: '0.0.0.0' # Bind the NiFi web interface to all available network interfaces | |
NIFI_WEB_HTTP_PORT: 8080 # Set the NiFi web interface port | |
networks: | |
- elk_nifi_network | |
# Custom network for communication between services | |
networks: | |
elk_nifi_network: | |
driver: bridge | |
# Persistent volumes for Elasticsearch, Kibana, and NiFi | |
volumes: | |
es_data: | |
kibana_config: | |
nifi_conf: | |
nifi_flowfile: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment