Last active
April 6, 2021 17:33
-
-
Save vicenterusso/5aea51a2126ee03c104b12fd30fc326a to your computer and use it in GitHub Desktop.
Docker Composer GrayLog (4.0) + Elastic Search (7.10.0)
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: '3' | |
| services: | |
| # MongoDB: https://hub.docker.com/_/mongo/ | |
| mongo: | |
| image: mongo:4.4 | |
| volumes: | |
| - mongo_data:/data/db | |
| networks: | |
| - graylog | |
| # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 | |
| volumes: | |
| - es_data:/usr/share/elasticsearch/data | |
| environment: | |
| - http.host=0.0.0.0 | |
| - transport.host=localhost | |
| - network.host=0.0.0.0 | |
| - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
| ulimits: | |
| memlock: | |
| soft: -1 | |
| hard: -1 | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 1g | |
| networks: | |
| - graylog | |
| # Graylog: https://hub.docker.com/r/graylog/graylog/ | |
| graylog: | |
| image: graylog/graylog:4.0 | |
| volumes: | |
| - graylog_data:/usr/share/graylog/data | |
| environment: | |
| - GRAYLOG_ELASTICSEARCH_VERSION=7 | |
| # CHANGE ME (must be at least 16 characters)! | |
| - GRAYLOG_PASSWORD_SECRET=somepasswordpepper | |
| # Password: admin | |
| - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 | |
| - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/ | |
| - DISABLE_TELEMETRY=1 | |
| networks: | |
| - graylog | |
| depends_on: | |
| - mongo | |
| - elasticsearch | |
| ports: | |
| # Containers should only listen on 127.0.0.1, Apache is our TLS proxy | |
| # Graylog web interface and REST API | |
| - 127.0.0.1:9000:9000 | |
| # Syslog TCP | |
| # - 1514:1514 | |
| # Syslog UDP | |
| # - 1514:1514/udp | |
| # GELF TCP | |
| # - 12201:12201 | |
| # GELF UDP | |
| # - 12201:12201/udp | |
| # GELF HTTP | |
| - 127.0.0.1:12202:12202 | |
| networks: | |
| graylog: | |
| driver: bridge | |
| # Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/ | |
| volumes: | |
| mongo_data: | |
| driver: local | |
| es_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