emqx_cluster/multi_node/node22.85/docker-compose.yaml
张建平 9adaacb84d feat: 初始化项目结构
添加 README.MD、images目录、single_node目录及其配置文件,multi_node目录及各节点配置。
2025-02-22 18:03:33 +08:00

35 lines
1.0 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__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