version: "3.6"
services:
  fluentd:
    deploy:
      placement:
        # this is not strictly required, but feels right
        constraints: [node.role == manager]

  elasticsearch:
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.type=single-node"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    deploy:
      placement:
        constraints: [node.role == manager]
      resources:
        limits:
          memory: 1000M
  kibana:
    deploy:
      placement:
        constraints: [node.role == manager]
      labels:
        # router for basic auth based access (https)
        - "traefik.http.routers.logging.rule=Host(`kibana.pdas.prism.eox.at`)"
        - "traefik.http.routers.logging.middlewares=apiauth@file,compress@file"
        - "traefik.http.routers.logging.tls=true"
        - "traefik.http.routers.logging.tls.certresolver=default"
        - "traefik.http.routers.logging.entrypoints=https"
