version: '2'
services:
graylog:
privileged: true
restart: always
image: graylog/graylog:3.3
container_name: graylog
environment:
# 密码盐值,随便改
- GRAYLOG_PASSWORD_SECRET=gr8r3hbnvfs73b8wefhweufpokdnc
# 管理员名称
- GRAYLOG_ROOT_USERNAME=admin
# 密码需要填写 SHA256 加密的密文,例如这里是 admin
# echo -n admin | shasum -a 256
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
# elasticsearch host
- GRAYLOG_ELASTICSEARCH_HOSTS=http://192.168.20.135:9200
# mongo host
- GRAYLOG_MONGODB_URI=mongodb://192.168.20.135:27017/graylog
# 时区
- GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai
# 将 x.x.x.x 替换成你的 IP
- GRAYLOG_WEB_ENDPOINT_URI=http://192.168.112.23:9000/api
- GRAYLOG_WEB_LISTEN_URI=http://192.168.112.23:9000/
- GRAYLOG_REST_LISTEN_URI=http://192.168.112.23:9000/api
# 其他配置请参考 graylog.conf 文件, 在需要覆盖的配置项前面加 "GRAYLOG_",换成大写
ports:
# web 和 api 端口
- 9000:9000
# Syslog TCP
- 514:514
# Syslog UDP
- 514:514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp