使用Docker-compose 两台外网服务器部署集群

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
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