version: '3'

services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3
    volumes:
      - ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
    environment:
      ES_JAVA_OPTS: "-Xmx256m -Xms256m"
    networks:
      - elk

  logstash:
    image: docker.elastic.co/logstash/logstash-oss:6.2.3
    volumes:
      - ./logstash.yml:/usr/share/logstash/config/logstash.yml:ro
      - ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro
    environment:
      LS_JAVA_OPTS: "-Xmx256m -Xms256m"
    networks:
      - elk
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.2.3
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml:ro
    ports:
      - "${OSM_ELK_PORTS:-5601:5601}"
    networks:
      - elk
    depends_on:
      - elasticsearch

networks:
  elk:
    external:
      name: ${OSM_NETWORK:-netOSM}
