-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (57 loc) · 1.43 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: "3.8"
services:
mqtt:
image: eclipse-mosquitto:2.0.13-openssl
hostname: mosquitto
ports:
# MQTT unencrypted TCP 1883
- mode: host
target: 1883
published: 1883
protocol: tcp
# MQTT encrypted TCP 8883
- mode: host
target: 8883
published: 8883
protocol: tcp
# Websocket unencrypted TCP 9001
- mode: host
target: 9001
published: 9001
protocol: tcp
# Websocket encrypted TCP 9883
- mode: host
target: 9883
published: 9883
protocol: tcp
networks:
- mqtt-net1
volumes:
- type: bind
source: /opt/mqtt/config/mosquitto.conf
target: /mosquitto/config/mosquitto.conf
- type: bind
source: /opt/mqtt/config/conf.d
target: /mosquitto/config/conf.d
- type: bind
source: /opt/mqtt/config/passwd
target: /mosquitto/config/passwd
- type: bind
source: /opt/mqtt/config/aclfile
target: /mosquitto/config/aclfile
- type: bind
source: /opt/mqtt/config/certs
target: /mosquitto/config/certs
- type: bind
source: /opt/mqtt/data
target: /mosquitto/data
- type: bind
source: /opt/mqtt/log
target: /mosquitto/log
deploy:
labels:
local.description: "Mosquitto MQTT"
restart_policy:
condition: on-failure
networks:
mqtt-net1: