version: '3'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.3.3
    container_name: es-node01
    networks:
      - elastic
    ports:
      - 9200:9200
      - 9300:9300 
    volumes:
      # - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - ./elasticsearch-data:/usr/share/elasticsearch/data

  kibana:
    container_name: kib-01
    networks:
      - elastic
    links:
      - elasticsearch
    ports:
      - 5601:5601
    # volumes:
      # - ./kibana/config:/usr/share/kibana/config
    image: docker.elastic.co/kibana/kibana:8.3.3
    depends_on:
      - elasticsearch

networks:
  elastic:
    driver: bridge
