Skip to content

Instantly share code, notes, and snippets.

@coder4temp
Last active March 5, 2023 10:09
Show Gist options
  • Save coder4temp/8336206b8eece886ee11a7fd4778e701 to your computer and use it in GitHub Desktop.
Save coder4temp/8336206b8eece886ee11a7fd4778e701 to your computer and use it in GitHub Desktop.
installation of graylog
version: '3'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongo:
image: mongo:5.0.13
networks:
- graylog
volumes:
- /home/mongo_data:/data/db
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
elasticsearch:
user: $USER
hostname: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- graylog
volumes:
- /home/es_data:/usr/share/elasticsearch/data
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
user: $USER
image: graylog/graylog:5.0
environment:
- GRAYLOG_HTTP_EXTERNAL_URI=http://${GRAYLOG_EXTERNAL_IP:?Please configure GRAYLOG_EXTERNAL_IP in the .env file}:9000/
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_PASSWORD_SECRET="${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
- GRAYLOG_ROOT_PASSWORD_SHA2="${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}"
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
networks:
- graylog
restart: always
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- "9000:9000"
# Syslog TCP
- "1514:1514"
# Syslog UDP
- "1514:1514/udp"
# GELF TCP
- "12201-12220:12201-12220"
# GELF UDP
- "12201-12220:12201-12220/udp"
volumes:
- /home/graylog_data:/usr/share/graylog/data
networks:
graylog:
driver: bridge
volumes:
es_data:
driver: local
mongo_data:
driver: local
graylog_data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment