【MQTT】通过Docker-Compose 安装MQTT服务
Suriski 2/2/2023 MQTTDocker
# docker容器
# docker-compose
version: '2'
networks:
emqx-bridge:
driver: bridge
services:
emqx:
image: emqx/emqx:latest
container_name: emqx
restart: always
ports:
- 18083:18083
- 1883:1883
- 8083:8083
- 8884:8884
environment:
- "EMQX_NAME=foo_emqx"
- "EMQX_HOST=127.0.0.1"
- "DEV_LISTENERS__TCP__DEFAULT__BIND=1883"
volumes:
- "./work/emqx/log:/opt/emqx/log"
networks:
- emqx-bridge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 启动图形化界面
- 启动容器
- 链接:
http://localhost:18083
(localhost
自行替换为自己公网IP) - 账号:
- 默认账号:admin
- 默认密码:public