1
0
mirror of https://github.com/krislamo/graylog_demo synced 2024-11-09 21:50:35 +00:00
graylog_demo/docker-compose.yml

108 lines
2.7 KiB
YAML

version: '3.7'
services:
traefik:
image: traefik:2.2.1
restart: always
networks:
- traefik-net
ports:
- 8080:80
command:
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--api.dashboard=true"
- "--log.level=DEBUG"
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.172.28.128.30.xip.io`)"
- 'traefik.http.middlewares.auth.basicauth.users=admin:$$apr1$$T1l.BCFz$$Jyg8msXYEAUi3LLH39I9d1'
- "traefik.http.routers.traefik.middlewares=auth@docker"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.docker.network=vagrant_traefik-net"
- "traefik.enable=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
logging:
driver: "fluentd"
options:
fluentd-address: "tcp://127.0.0.1:24224"
fluentd-async-connect: "true"
tag: traefik
mongo:
image: mongo:4.2.8
restart: always
networks:
- graylog
logging:
driver: "fluentd"
options:
fluentd-address: "tcp://127.0.0.1:24224"
fluentd-async-connect: "true"
tag: graylog.db
elasticsearch:
image: elasticsearch:6.8.10
restart: always
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
networks:
- graylog
logging:
driver: "fluentd"
options:
fluentd-address: "tcp://127.0.0.1:24224"
fluentd-async-connect: "true"
tag: graylog.elasticsearch
graylog:
image: graylog/graylog:3.3.2
restart: always
environment:
- GRAYLOG_PASSWORD_SECRET=LongerPassword01
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://172.28.128.30:9000/
labels:
- "traefik.http.routers.graylog.rule=Host(`graylog.172.28.128.30.xip.io`)"
- "traefik.http.services.graylog.loadbalancer.server.port=9000"
- "traefik.docker.network=vagrant_traefik-net"
- "traefik.enable=true"
networks:
- graylog
- traefik-net
depends_on:
- mongo
- elasticsearch
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
logging:
driver: "fluentd"
options:
fluentd-address: "tcp://127.0.0.1:24224"
fluentd-async-connect: "true"
tag: graylog
networks:
traefik-net:
graylog:
driver: bridge