-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
103 lines (87 loc) · 1.87 KB
/
docker-compose.yaml
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
98
99
100
101
102
103
x-common: &common
restart: always
logging:
options:
max-size: "10m"
max-file: "5"
x-image: &image
build:
context: "./"
dockerfile: "./Dockerfile"
image: smthngslv/invian
x-sensor: &sensor
<<: *image
command: "sensor"
environment:
- INVIAN_CONTROLLER_API_URL=http://controller:8000
depends_on:
- controller
<<: *common
services:
controller:
<<: *image
container_name: invian-controller
command: "controller"
environment:
- INVIAN_REDIS_URL=redis://redis
- INVIAN_MONGODB_URL=mongodb://invian:invian@mongodb
ports:
- "8000:8000"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/docs" ]
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
depends_on:
- mongodb
- redis
<<: *common
manipulator:
<<: *image
container_name: invian-manipulator
command: "manipulator"
environment:
- INVIAN_CONTROLLER_TCP_URL=tcp://controller:1111
depends_on:
- controller
<<: *common
sensor-1:
container_name: invian-sensor-1
<<: *sensor
sensor-2:
container_name: invian-sensor-2
<<: *sensor
sensor-3:
container_name: invian-sensor-3
<<: *sensor
sensor-4:
container_name: invian-sensor-4
<<: *sensor
sensor-5:
container_name: invian-sensor-5
<<: *sensor
sensor-6:
container_name: invian-sensor-6
<<: *sensor
sensor-7:
container_name: invian-sensor-7
<<: *sensor
sensor-8:
container_name: invian-sensor-8
<<: *sensor
redis:
image: redis:latest
container_name: invian-redis
ports:
- "6379:6379"
<<: *common
mongodb:
image: mongo:6
container_name: invian-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: invian
MONGO_INITDB_ROOT_PASSWORD: invian
ports:
- "27017:27017"
<<: *common