Created
January 11, 2024 10:24
-
-
Save arsalanses/023f3f1f0359ec28b4c1040f55f85175 to your computer and use it in GitHub Desktop.
graylog
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
| services: | |
| mongo: | |
| image: mongo:5.0.13 | |
| container_name: graylog_mongodb | |
| # volumes: | |
| # - mongo_data:/data/db | |
| networks: | |
| - graylog | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 | |
| container_name: graylog_es | |
| environment: | |
| - http.host=0.0.0.0 | |
| - transport.host=localhost | |
| - network.host=0.0.0.0 | |
| - "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m" | |
| - discovery.type=single-node | |
| - bootstrap.memory_lock=true | |
| - action.auto_create_index=false | |
| # volumes: | |
| # - es_data:/usr/share/elasticsearch/data | |
| networks: | |
| - graylog | |
| ulimits: | |
| memlock: | |
| soft: -1 | |
| hard: -1 | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 1g | |
| graylog: | |
| image: graylog/graylog:5.2.3 | |
| container_name: graylog | |
| restart: always | |
| entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh | |
| depends_on: | |
| mongo: | |
| condition: "service_started" | |
| elasticsearch: | |
| condition: "service_started" | |
| environment: | |
| - GRAYLOG_PASSWORD_SECRET=somepasswordpepper | |
| # echo -n "Enter Password: " && head -1 < /dev/stdin | tr -d '\n' | sha256sum | cut -d " " -f1 | |
| - GRAYLOG_ROOT_PASSWORD_SHA2=19461b43bbba8a3a4da70703bda96dbc6dcdc2ee78507e34d2bf0f281932fd1f | |
| - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/ | |
| # - GRAYLOG_HTTP_PUBLISH_URI=http://127.0.0.1:9000/ | |
| - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000 | |
| - GRAYLOG_ELASTICSEARCH_HOSTS=http://elasticsearch:9200 | |
| - GRAYLOG_MONGODB_URI=mongodb://mongo:27017/graylog | |
| # volumes: | |
| # - graylog_data:/usr/share/graylog/data | |
| # - ./graylog/config:/usr/share/graylog/data/config | |
| networks: | |
| - graylog | |
| 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 | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.docker.network=web_net" | |
| - "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https" | |
| - "traefik.http.routers.graylog.entrypoints=http" | |
| - "traefik.http.routers.graylog.rule=Host(`example.com`)" | |
| - "traefik.http.routers.graylog.middlewares=https-redirect" | |
| - "traefik.http.routers.graylog-secure.entrypoints=https" | |
| - "traefik.http.routers.graylog-secure.rule=Host(`example.com`)" | |
| - "traefik.http.routers.graylog-secure.tls=true" | |
| - "traefik.http.services.graylog.loadbalancer.server.port=9000" | |
| # volumes: | |
| # mongo_data: | |
| # driver: local | |
| # es_data: | |
| # driver: local | |
| # graylog_data: | |
| # driver: local | |
| networks: | |
| graylog: | |
| driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment