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

59 lines
1.9 KiB
YAML

services:
emqx1:
image: emqx/emqx:5.8.4
container_name: emqx1
hostname: emqx1-cluster.emqx.io
environment:
- EMQX_NODE__NAME=emqx1@emqx1-cluster.emqx.io
- EMQX_CLUSTER__DISCOVERY_STRATEGY=static
- EMQX_DASHBOARD__DEFAULT_PASSWORD=admin123456 # dashboard密码
- EMQX_CLUSTER__STATIC__SEEDS=emqx1@emqx1-cluster.emqx.io,emqx2@emqx2-cluster.emqx.io,emqx3@emqx3-cluster.emqx.io
- EMQX_API_KEY__BOOTSTRAP_FILE=/opt/emqx/etc/api_key.conf
ports:
- 18083:18083
volumes:
- ./api_key.conf:/opt/emqx/etc/api_key.conf
emqx2:
image: emqx/emqx:5.8.4
container_name: emqx2
hostname: emqx2-cluster.emqx.io
environment:
- EMQX_NODE__NAME=emqx2@emqx2-cluster.emqx.io
- EMQX_CLUSTER__DISCOVERY_STRATEGY=static
- EMQX_DASHBOARD__DEFAULT_PASSWORD=admin123456
- EMQX_CLUSTER__STATIC__SEEDS=emqx1@emqx1-cluster.emqx.io,emqx2@emqx2-cluster.emqx.io,emqx3@emqx3-cluster.emqx.io
- EMQX_API_KEY__BOOTSTRAP_FILE=/opt/emqx/etc/api_key.conf
volumes:
- ./api_key.conf:/opt/emqx/etc/api_key.conf
emqx3:
image: emqx/emqx:5.8.4
container_name: emqx3
hostname: emqx3-cluster.emqx.io
environment:
- EMQX_NODE__NAME=emqx3@emqx3-cluster.emqx.io
- EMQX_CLUSTER__DISCOVERY_STRATEGY=static
- EMQX_DASHBOARD__DEFAULT_PASSWORD=admin123456
- EMQX_CLUSTER__STATIC__SEEDS=emqx1@emqx1-cluster.emqx.io,emqx2@emqx2-cluster.emqx.io,emqx3@emqx3-cluster.emqx.io
- EMQX_API_KEY__BOOTSTRAP_FILE=/opt/emqx/etc/api_key.conf
volumes:
- ./api_key.conf:/opt/emqx/etc/api_key.conf
nginx:
image: nginx
container_name: nginx
ports:
- 1883:1883
- 8883:8883
- 8083:8083
- 8084:8084
- 8888:8888 # nginx status
volumes:
- $PWD/nginx.conf:/etc/nginx/nginx.conf
- $PWD/certs:/etc/nginx/certs
networks:
emqx-net:
driver: emqx-net