Skip to content

Instantly share code, notes, and snippets.

@jukbot
Last active February 23, 2019 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jukbot/83f6a2a1695653a8a3a0b087e307ff99 to your computer and use it in GitHub Desktop.
Save jukbot/83f6a2a1695653a8a3a0b087e307ff99 to your computer and use it in GitHub Desktop.
Graylog 3 docker compose sample (recommended for 2 cores 4 gb)
version: '2'
services:
mongodb:
container_name: mongodb
image: mongo:3
restart: on-failure
volumes:
- mongo_data:/data/db
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
restart: on-failure
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
# Disable X-Pack security: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/security-settings.html#general-security-settings
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- es_data:/usr/share/elasticsearch/data
graylog:
container_name: graylog
image: graylog/graylog:3.0
restart: on-failure
environment:
- TZ=Asia/Bangkok
- GRAYLOG_PASSWORD_SECRET=09iuygfdsqwe4r5t6y7uikjhgfderty
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_HTTP_EXTERNAL_URI=http://0.0.0.0:9000/
links:
- mongodb:mongo
- elasticsearch
depends_on:
- mongodb
- elasticsearch
volumes:
- graylog_journal:/usr/share/graylog/data/journal
- ./graylog/config:/usr/share/graylog/data/config
- ./graylog/certs:/usr/share/graylog/data/certs
- ./graylog/plugin:/usr/share/graylog/plugin
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 514:514
# Syslog UDP
- 514:514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
volumes:
mongo_data:
driver: local
es_data:
driver: local
graylog_journal:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment