forked from chuanjin/docker-mosquitto-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (44 loc) · 933 Bytes
/
docker-compose.yml
File metadata and controls
49 lines (44 loc) · 933 Bytes
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
version: '2'
services:
mqtt_db:
build:
context: .
dockerfile: Dockerfile-postgres
ports:
- "5432:5432"
container_name: "postgres-mosq"
networks:
- mosqnet
mosquitto:
restart: always
build:
context: .
dockerfile: Dockerfile-mosquitto
container_name: "broker-mosq"
volumes:
- ./mqtt.conf:/etc/mosquitto/mosquitto.conf
ports:
- "1883:1883"
- "1884:1884"
networks:
- mosqnet
depends_on:
- mqtt_db
labels:
- "local.example.description=Mosquitto v1.4.14 MQTT server"
command: ["./wait-for-postgres.sh", "mqtt_db", "mosquitto", "-c", "/etc/mosquitto/mosquitto.conf"]
flask:
build:
context: .
dockerfile: Dockerfile-flask
links:
- "mqtt_db"
ports:
- "5000:5000"
container_name: "flask-mosq"
networks:
- mosqnet
depends_on:
- mqtt_db
networks:
mosqnet: