-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (79 loc) · 1.61 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# source https://medium.com/@isurunuwanthilaka/get-into-mqtt-in-2-minutes-python-docker-5d4e8b55cf1c
version: "3"
services:
mqtt:
image: toke/mosquitto
networks:
- web
container_name: mqtt
expose:
- 1883
ports:
- 1883:1883
restart: unless-stopped
sensor:
image: image/sensor
networks:
- web
links:
- ingestion
# source https://medium.com/@nirgn/load-balancing-applications-with-haproxy-and-docker-d719b7c5b231
proxy:
image: dockercloud/haproxy
environment:
- BALANCE=leastconn
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 80:80
networks:
- web
links:
- ingestion
ingestion:
image: image/ingestion
networks:
- web
ports:
- 5000
links:
- mqtt
environment:
- SERVICE_PORTS=5000
storage:
image: image/storage
networks:
- web
links:
- mqtt
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
postgres:
restart: always
image: postgres:10
volumes:
- db-data:/var/lib/postgresql
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
ports:
- "5432:5432"
networks:
- web
grafana:
image: custom/grafana
ports:
- 3000:3000
networks:
- web
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
networks:
web:
volumes:
db-data: