Created
November 17, 2017 16:04
-
-
Save indigo423/b6f1594e2512fddb0e677435937e8937 to your computer and use it in GitHub Desktop.
Graylog2 Docker Compose file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
yes it needs to be the endpoint you want to consume your service which is related to your environment.
https://gist.github.com/indigo423/b6f1594e2512fddb0e677435937e8937#file-graylog2-docker-compose-yml-L28-L52
Contains 2 ulimit and volumes sections.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.