Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Graylog2 Docker Compose file
version: '2'
networks:
graylog.net:
volumes:
graylog.data.elastic:
driver: "local"
graylog.data.mongo:
driver: "local"
services:
mongo:
image: mongo:3
container_name: mongo
hostname: mongo
environment:
- TZ=Europe/Berlin
volumes:
- graylog.data.mongo:/data/db
networks:
- graylog.net
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.3
container_name: elasticsearch
hostname: graylog.elastic
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- graylog.data.elastic:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=elasticsearch
- network.host=0.0.0.0
- TZ=Europe/Berlin
- cluster.name=graylog
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
networks:
- graylog.net
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- graylog.data.elastic:/usr/share/elasticsearch/data
networks:
- graylog.net
ports:
- "9200:9200"
graylog:
image: graylog2/server:2.3.2-2
hostname: graylog
environment:
- TZ=Europe/Berlin
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_WEB_ENDPOINT_URI=http://my-graylog-web-server:9000/api
- GRAYLOG_ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_HOSTS=elasticsearch
ports:
- 9000:9000
- 12201:12201/udp
- 514:514/udp
links:
- mongo
- elasticsearch
networks:
- graylog.net
@mfuhrmann

This comment has been minimized.

Show comment
Hide comment
@mfuhrmann

mfuhrmann Nov 20, 2017

Does GRAYLOG_WEB_ENDPOINT_URI has to be changed before running docker-compose? https://gist.github.com/indigo423/b6f1594e2512fddb0e677435937e8937#file-graylog2-docker-compose-yml-L65
In my test it didn't work to run http://ip:9000 to get the web ui. If I can translate my-graylog-web-server to the servers' IP address it works.

mfuhrmann commented Nov 20, 2017

Does GRAYLOG_WEB_ENDPOINT_URI has to be changed before running docker-compose? https://gist.github.com/indigo423/b6f1594e2512fddb0e677435937e8937#file-graylog2-docker-compose-yml-L65
In my test it didn't work to run http://ip:9000 to get the web ui. If I can translate my-graylog-web-server to the servers' IP address it works.

@indigo423

This comment has been minimized.

Show comment
Hide comment
@indigo423

indigo423 Dec 7, 2017

yes it needs to be the endpoint you want to consume your service which is related to your environment.

Owner

indigo423 commented Dec 7, 2017

yes it needs to be the endpoint you want to consume your service which is related to your environment.

@mfuhrmann

This comment has been minimized.

Show comment
Hide comment

mfuhrmann commented Dec 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment