-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
66 lines (60 loc) · 1.97 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
60
61
62
63
64
65
66
###############################################################################
# Author: Agustin Bassi
# Date: July 2020
# Copyright: Agustin Bassi
# Project: MQ-Connection
# Brief: TODO: Describe it
#
# To attach to mosquitto clients running into mosquitto container run:
#
# - docker exec -it mosquitto mosquitto_sub -t "#"
# - docker exec -it mosquitto mosquitto_pub -t "greet" "hello mq-connection"
#
###############################################################################
version: '3'
services:
mosquitto:
# service header
image: eclipse-mosquitto:latest
hostname: mosquitto
container_name: mosquitto
# project labels
labels:
project: "MQ Connection"
day: "Jul 2020"
mantainer: Agustin Bassi
# service specific settings
volumes:
- ./mqtt-broker/config:/mosquitto/config
- ./mqtt-broker/auth:/etc/mosquitto/
# - ./mqtt-broker/certs:/mosquitto/certs
networks:
- mq-connection-network
expose:
- "1883"
- "8883"
- "9001"
ports:
- "1883:1883"
- "8883:8883"
- "9001:9001"
web-client:
# service header
image: httpd:2.4
hostname: web-client
container_name: web-client
# project labels
labels:
project: "MQ Connection"
day: "Jul 2020"
mantainer: Agustin Bassi
# service specific settings
volumes:
- ./mqtt-client-web:/usr/local/apache2/htdocs/
networks:
- mq-connection-network
ports:
- "5001:80"
networks:
mq-connection-network:
driver: bridge