docker 集群部署失败

我的这个脚本在两台服务器上面跑起来,只能看到本身自己的节点


EMQX_NODE__COOKIE 字段加上试试

version: ‘3’
services:
emqx1:
image: emqx/emqx:5.5.0
container_name: emqx
environment:
- “EMQX_NODE_NAME=emqx02@外网IP”
- “EMQX_CLUSTER__DISCOVERY_STRATEGY=static”
- “EMQX_CLUSTER__STATIC__SEEDS=[emqx01@外网IP,emqx02@外网IP]”
- “EMQX_NODE__COOKIE=abc”
ports:
- 1883:1883
- 8031:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083

version: ‘3’
services:
emqx1:
image: emqx/emqx:5.5.0
environment:
- “EMQX_NODE_NAME=emqx01@外网ip”
- “EMQX_CLUSTER__DISCOVERY_STRATEGY=static”
- “EMQX_CLUSTER__STATIC__SEEDS=[emqx01@外网ip,emqx02@外网ip]”
- “EMQX_NODE__COOKIE=abc”
ports:
- 1883:1883
- 8031:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083

上面是我的部署文件,但还是单节点,没有变成集群