---
# docker-compose file for graylog
# DOCKER_HOST=dkhost03:2376 docker-compose up -d
# DOCKER_HOST=dkhost03:2376 docker stack deploy -c docker-compose.yml services

version: '3'
services:

  elasticsearch:
    image: "elasticsearch:2"
#    image: docker.elastic.co/elasticsearch/elasticsearch:5.4.1
    command: "elasticsearch -Des.cluster.name='es.xai-corp.net'"
    volumes:
      - /data/elasticsearch/data:/usr/share/elasticsearch/data
      - /data/elasticsearch/config:/usr/share/elasticsearch/config
    ports:
#      - "9350:9350"
#      - "9300:9300"
      - "9200:9200"
#      - "10091:80"
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: any
        delay: "1s"
        max_attempts: 1
      resources:
        limits:
          cpus: '1'
          memory: 512M

  ui:
    image: mobz/elasticsearch-head:2
    ports:
      - "1358:9100"
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: any
        delay: "1s"
        max_attempts: 1


networks:
  default:
    external:
      name: prod
