version: "3.0"

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.0
    ulimits:
      memlock:
        soft: -1
        hard: -1
    environment:
      discovery.type: single-node
    ports:
      - 9200:9200
    volumes:
      - es-data:/usr/share/elasticsearch/data

  test:
    build: .
    environment:
      ES_ROOT_URL: http://elasticsearch:9200
      ES_USE_SSL: 0
    volumes:
      - ${PWD}/data:/app/data:ro
    #stdin_open: true
    #tty: true

volumes:
  es-data:
