From 68f6f7b3ace73fb86c76e5963c427dc59e50305c Mon Sep 17 00:00:00 2001 From: Czechman Date: Sat, 7 Jan 2023 12:15:35 +0100 Subject: [PATCH] Beispieldateien angepasst --- .env | 14 ++++++++++ docker-compose.yml | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .env create mode 100644 docker-compose.yml diff --git a/.env b/.env new file mode 100644 index 0000000..1a8d5b6 --- /dev/null +++ b/.env @@ -0,0 +1,14 @@ +# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters. +# Generate one by using for example: pwgen -N 1 -s 96 +# ATTENTION: This value must be the same on all Graylog nodes in the cluster. +# Changing this value after installation will render all user sessions and encrypted values in the database invalid. (e.g. encrypted access tokens) +GRAYLOG_PASSWORD_SECRET="Xsb2uFwnRYMRfkCDl6IkGVyanZwWbjX3FzMvzpmZj0uOgyxft05nmmiBfX01Sa1rwlprqmVqElxd7borhzkmUoHJbmqD0Ecb" + +# You MUST specify a hash password for the root user (which you only need to initially set up the +# system and in case you lose connectivity to your authentication backend) +# This password cannot be changed using the API or via the web interface. If you need to change it, +# modify it in this file. +# Create one by using for example: echo -n yourpassword | shasum -a 256 +# and put the resulting hash value into the following line +# CHANGE THIS! +GRAYLOG_ROOT_PASSWORD_SHA2="4ecf565d4c1b1606facdba3ff1ee5dc3cc1fde93b74d5aa33e6d1c3690e5cade" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8609f2e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,66 @@ +version: "3.8" + +services: + mongodb: + image: "mongo:5.0" + volumes: + - "mongodb_data:/data/db" + restart: "on-failure" + + opensearch: + image: "opensearchproject/opensearch:2.4.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" + ulimits: + memlock: + hard: -1 + soft: -1 + volumes: + - "os_data:/usr/share/opensearch/data" + restart: "on-failure" + + graylog: + hostname: "server" + image: "${GRAYLOG_IMAGE:-graylog/graylog:5.0}" + depends_on: + opensearch: + condition: "service_started" + mongodb: + condition: "service_started" + entrypoint: "/usr/bin/tini -- wait-for-it opensearch:9200 -- /docker-entrypoint.sh" + environment: + GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/node-id" + GRAYLOG_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}" + GRAYLOG_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}" + GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000" + GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9001/" + GRAYLOG_ELASTICSEARCH_HOSTS: "http://opensearch:9200" + GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog" + ports: + - "5044:5044/tcp" # Beats + - "5140:5140/udp" # Syslog + - "5140:5140/tcp" # Syslog + - "5555:5555/tcp" # RAW TCP + - "5555:5555/udp" # RAW TCP + - "9001:9000/tcp" # Server API + - "12201:12201/tcp" # GELF TCP + - "12201:12201/udp" # GELF UDP + #- "10000:10000/tcp" # Custom TCP port + #- "10000:10000/udp" # Custom UDP port + - "13301:13301/tcp" # Forwarder data + - "13302:13302/tcp" # Forwarder config + volumes: + - "graylog_data:/usr/share/graylog/data/data" + - "graylog_journal:/usr/share/graylog/data/journal" + restart: "on-failure" + +volumes: + mongodb_data: + os_data: + graylog_data: + graylog_journal: