This repository has been archived by the owner on Feb 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-swarm-server.yml
97 lines (94 loc) · 1.88 KB
/
docker-compose-swarm-server.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
89
90
91
92
93
94
95
96
97
version: '3.3'
services:
db:
image: mysql:5.6
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=smart_remote
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- rpi-net
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
node-red:
build:
context: ./node-red
dockerfile: Dockerfile
image: notfoundsam/node-red-swarm
environment:
- FLOWS=smart_remote.json
ports:
- "1880:1880"
- "9090:9090"
user: node-red
networks:
- rpi-net
deploy:
replicas: 1
influxdb:
image: influxdb
environment:
- INFLUXDB_DB=smart_remote
ports:
- "8086:8086"
volumes:
- influx-data:/var/lib/influxdb
networks:
- rpi-net
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
networks:
- rpi-net
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
mosquitto:
image: eclipse-mosquitto
ports:
- "1883:1883"
- "9001:9001"
networks:
- rpi-net
deploy:
replicas: 1
cadvisor:
image: google/cadvisor
hostname: '{{.Node.Hostname}}'
command: -logtostderr -docker_only -storage_driver=influxdb -storage_driver_db=smart_remote -storage_driver_host=influxdb:8086
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
# - /dev/disk/:/dev/disk:ro
ports:
- "8080:8080"
networks:
- rpi-net
deploy:
mode: global
networks:
rpi-net:
driver: overlay
attachable: true
volumes:
influx-data:
mysql-data:
grafana-data: