From 2d340f2b725dec44cb1b80fb3b5a20cc0cb1f29c Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Tue, 11 Jun 2024 03:19:48 +0200 Subject: [PATCH] Add graylog docker services. --- tests/docker-compose-file-writer.yml | 64 +++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/tests/docker-compose-file-writer.yml b/tests/docker-compose-file-writer.yml index eb39197..90057ac 100644 --- a/tests/docker-compose-file-writer.yml +++ b/tests/docker-compose-file-writer.yml @@ -1,4 +1,4 @@ -version: "3.5" +version: "11.06.2024" # Calendar versioning services: # Kafka and file-writer services are copied from @@ -67,5 +67,67 @@ services: networks: - frontend + # Graylog setup + # MongoDB: https://hub.docker.com/_/mongo/ + mongodb: + image: mongo:6.0.14 + networks: + - frontend + + opensearch: + image: "opensearchproject/opensearch:2.12.0" + environment: + - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g" + - "bootstrap.memory_lock=true" + - "discovery.type=single-node" + - "action.auto_create_index=false" + - "plugins.security.ssl.http.enabled=false" + - "plugins.security.disabled=true" + # Can generate a password for `OPENSEARCH_INITIAL_ADMIN_PASSWORD` using a linux device via: + # tr -dc A-Z-a-z-0-9_@#%^-_=+ < /dev/urandom | head -c${1:-32} + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=+_8r#wliY3Pv5-HMIf4qzXImYzZf-M=M + ulimits: + memlock: + hard: -1 + soft: -1 + nofile: + soft: 65536 + hard: 65536 + restart: "on-failure" + networks: + - frontend + + # Graylog: https://hub.docker.com/r/graylog/graylog/ + graylog: + image: graylog/graylog:5.2 + environment: + - GRAYLOG_NODE_ID_FILE=/usr/share/graylog/data/config/node-id + - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000 + - GRAYLOG_ELASTICSEARCH_HOSTS=http://opensearch:9200 + - GRAYLOG_MONGODB_URI=mongodb://mongodb:27017/graylog + # 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/ + entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh + networks: + - frontend + restart: always + depends_on: + - mongodb + - opensearch + ports: + # Graylog web interface and REST API + - 9000:9000 + # Syslog TCP + - 1514:1514 + # Syslog UDP + - 1514:1514/udp + # GELF TCP + - 12201:12201 + # GELF UDP + - 12201:12201/udp + networks: frontend: