36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
#version: '3'
|
|
services:
|
|
emqx:
|
|
image: emqx/emqx:5.8.4
|
|
container_name: emqx
|
|
hostname: 192.168.22.85
|
|
# networks:
|
|
# emqx-net:
|
|
# network_mode: host
|
|
environment:
|
|
- EMQX_NODE__NAME=emqx@192.168.22.85 # 节点名称
|
|
- EMQX_NODE__MAX_PORTS=2097152 # 节点最大端口数
|
|
- EMQX_NODE__COOKIE=emqx_dist_cookie # 集群通信cookie
|
|
- EMQX_DASHBOARD__DEFAULT_PASSWORD=admin123456 # dashboard密码
|
|
- EMQX_CLUSTER__DISCOVERY_STRATEGY=static # 集群发现策略 可选 manual | static | dns | etcd | k8s | singleton
|
|
- EMQX_CLUSTER__STATIC__SEEDS=emqx@192.168.20.200,emqx@192.168.20.50,emqx@192.168.22.85
|
|
- EMQX_API_KEY__BOOTSTRAP_FILE=/opt/emqx/etc/api_key.conf
|
|
ports:
|
|
- "1883:1883"
|
|
- "8083:8083"
|
|
- "8084:8084"
|
|
- "8883:8883"
|
|
- "18083:18083"
|
|
- "4370:4370"
|
|
- "5370:5370"
|
|
- "5369:5369"
|
|
volumes:
|
|
- ./api_key.conf:/opt/emqx/etc/api_key.conf
|
|
|
|
#networks:
|
|
# emqx-net:
|
|
# driver: bridge
|
|
# ipam:
|
|
# driver: default
|
|
# config:
|
|
# - subnet: 192.168.0.0/24 |