Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit 0bf123a

Browse files
Bergiujalogisch
Bergiu
authored andcommitted
added example for docker-compose version 3 (#735)
1 parent 60d73b9 commit 0bf123a

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

pages/installation/docker.rst

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Generate your own admin password with the following command and put the SHA-256
7474

7575
All these settings and command line parameters can be put in a ``docker-compose.yml`` file, so that they don't have to be executed one after the other.
7676

77-
Example::
77+
Example Version 2::
7878

7979
version: '2'
8080
services:
@@ -121,6 +121,62 @@ Example::
121121
# GELF UDP
122122
- 12201:12201/udp
123123

124+
Example Version 3::
125+
126+
version: '3'
127+
services:
128+
# MongoDB: https://hub.docker.com/_/mongo/
129+
mongo:
130+
image: mongo:3
131+
networks:
132+
- graylog
133+
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docker.html
134+
elasticsearch:
135+
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
136+
environment:
137+
- http.host=0.0.0.0
138+
- transport.host=localhost
139+
- network.host=0.0.0.0
140+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
141+
ulimits:
142+
memlock:
143+
soft: -1
144+
hard: -1
145+
deploy:
146+
resources:
147+
limits:
148+
memory: 1g
149+
networks:
150+
- graylog
151+
# Graylog: https://hub.docker.com/r/graylog/graylog/
152+
graylog:
153+
image: graylog/graylog:3.1
154+
environment:
155+
# CHANGE ME (must be at least 16 characters)!
156+
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
157+
# Password: admin
158+
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
159+
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
160+
networks:
161+
- graylog
162+
depends_on:
163+
- mongo
164+
- elasticsearch
165+
ports:
166+
# Graylog web interface and REST API
167+
- 9000:9000
168+
# Syslog TCP
169+
- 1514:1514
170+
# Syslog UDP
171+
- 1514:1514/udp
172+
# GELF TCP
173+
- 12201:12201
174+
# GELF UDP
175+
- 12201:12201/udp
176+
networks:
177+
graylog:
178+
driver: bridge
179+
124180
After starting all three Docker containers by running ``docker-compose up``, you can open the URL ``http://127.0.0.1:9000`` in a web browser and log in with username ``admin`` and password ``admin`` (make sure to change the password later). Change ``GRAYLOG_HTTP_EXTERNAL_URI=`` to your server IP if you run Docker remotely.
125181

126182

0 commit comments

Comments
 (0)