version: '3.9'
services:
  mongo:
    restart: always
    image: "mongo:3"
    volumes:
      - /opt/shared/graylog/data/mongo:/data/db
  elasticsearch:
    restart: always
    image: "elasticsearch:2"
    command: "elasticsearch -Des.cluster.name='graylog'"
    volumes:
      - /opt/shared/graylog/data/elasticsearch:/usr/share/elasticsearch/data
  graylog:
    restart: always
    image: graylog2/server:2.1.0-3
    volumes:
      - /opt/shared/graylog/data/journal:/usr/share/graylog/data/journal
      - /opt/shared/graylog/config:/usr/share/graylog/data/config
    environment:
      GRAYLOG_PASSWORD_SECRET: gsahu1dj901hdaiuafg3g1q
      GRAYLOG_ROOT_PASSWORD_SHA2: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
      GRAYLOG_WEB_ENDPOINT_URI: http://192.168.4.41:9000/api/
    depends_on:
      - mongo
      - elasticsearch
    ports:
      - "9000:9000"
      - "12201/udp:12201/udp"
      - "1514/udp:1514/udp"
