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
? ? ? # 時(shí)區(qū)
? ? ? - 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
? ? ? # 其他配置請(qǐng)參考 graylog.conf 文件, 在需要覆蓋的配置項(xiàng)前面加 "GRAYLOG_",換成大寫
? ? ports:
? ? ? # web 和 api 端口
? ? ? - 9000:9000
? ? ? # Syslog TCP
? ? ? - 514:514
? ? ? # Syslog UDP
? ? ? - 514:514/udp
? ? ? # GELF TCP
? ? ? - 12201:12201
? ? ? # GELF UDP
? ? ? - 12201:12201/udp