forked from DeviceFarmer/stf
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-prod.yaml
247 lines (244 loc) · 7.29 KB
/
docker-compose-prod.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
networks:
devicehub:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.211.0.0/16
gateway: 10.211.0.1
services:
nginx:
image: "nginx:bookworm"
container_name: devicehub-nginx
volumes:
- ./scripts/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8082:80"
depends_on:
- devicehub-app
- devicehub-websocket
- devicehub-storage-temp
- devicehub-storage-plugin-apk
- devicehub-storage-plugin-image
- devicehub-api
- devicehub-auth
restart: unless-stopped
networks:
devicehub:
mongo1:
image: mongo:6.0.10
hostname: mongo1
container_name: mongo1
ports:
- 27017:27017
entrypoint: ["mongod", "--replSet", "myReplicaSet", "--bind_ip_all"]
networks:
devicehub:
ipv4_address: 10.211.0.2
mongo2:
image: mongo:6.0.10
hostname: mongo2
container_name: mongo2
entrypoint: ["mongod", "--replSet", "myReplicaSet", "--bind_ip_all"]
networks:
devicehub:
ipv4_address: 10.211.0.3
mongo3:
image: mongo:6.0.10
hostname: mongo3
container_name: mongo3
entrypoint: ["mongod", "--replSet", "myReplicaSet", "--bind_ip_all"]
networks:
devicehub:
ipv4_address: 10.211.0.4
mongosetup:
image: mongo:6.0.10
container_name: mongosetup
depends_on:
- mongo1
- mongo2
- mongo3
volumes:
- ./scripts/mongo_setup.sh:/scripts/mongo_setup.sh
restart: "no"
entrypoint: ["bash", "/scripts/mongo_setup.sh"]
networks:
devicehub:
devicehub-migrate:
build: .
image: vkcom/devicehub
container_name: devicehub-migrate
env_file:
- scripts/variables.env
command: stf migrate
depends_on:
mongosetup:
condition: service_completed_successfully
networks:
devicehub:
devicehub-app:
build: .
image: vkcom/devicehub
container_name: devicehub-app
env_file:
- scripts/variables.env
command: stf app --port 3000 --auth-url ${STF_URL}/${AUTH_URL} --websocket-url ${STF_URL}/ --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-auth:
build: .
image: vkcom/devicehub
container_name: devicehub-auth
env_file:
- scripts/variables.env
command: stf ${AUTH_TYPE} --port 3000 --app-url ${STF_URL} --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-processor001:
build: .
image: vkcom/devicehub
container_name: devicehub-processor001
env_file:
- scripts/variables.env
command: stf processor --name proc001 --connect-app-dealer tcp://devicehub-triproxy-app:7160 --connect-dev-dealer tcp://devicehub-triproxy-dev:7260
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-reaper:
build: .
image: vkcom/devicehub
container_name: devicehub-reaper
env_file:
- scripts/variables.env
command: stf reaper --name reaper001 --connect-push tcp://devicehub-triproxy-dev:7270 --connect-sub tcp://devicehub-triproxy-app:7150 --heartbeat-timeout 30000
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-storage-plugin-apk:
build: .
image: vkcom/devicehub
container_name: devicehub-storage-plugin-apk
env_file:
- scripts/variables.env
command: stf storage-plugin-apk --port 3000 --storage-url ${STF_URL}/ --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-storage-plugin-image:
build: .
image: vkcom/devicehub
container_name: devicehub-storage-plugin-image
env_file:
- scripts/variables.env
command: stf storage-plugin-image --port 3000 --storage-url ${STF_URL}/ --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-storage-temp:
build: .
image: vkcom/devicehub
container_name: devicehub-storage-temp
env_file:
- scripts/variables.env
command: stf storage-temp --port 3000 --save-dir /data --connect-sub tcp://devicehub-triproxy-app:7150 --connect-push tcp://devicehub-triproxy-app:7170 --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-triproxy-app:
build: .
image: vkcom/devicehub
container_name: devicehub-triproxy-app
env_file:
- scripts/variables.env
command: stf triproxy app001 --bind-pub "tcp://*:7150" --bind-dealer "tcp://*:7160" --bind-pull "tcp://*:7170"
ports:
- "7150:7150"
- "7160:7160"
- "7170:7170"
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-triproxy-dev:
build: .
image: vkcom/devicehub
container_name: devicehub-triproxy-dev
env_file:
- scripts/variables.env
command: stf triproxy --name dev001 --bind-pub "tcp://*:7250" --bind-dealer "tcp://*:7260" --bind-pull "tcp://*:7270"
ports:
- "7250:7250"
- "7260:7260"
- "7270:7270"
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-websocket:
build: .
image: vkcom/devicehub
container_name: devicehub-websocket
env_file:
- scripts/variables.env
command: stf websocket --port 3000 --storage-url ${STF_URL}/ --connect-sub tcp://devicehub-triproxy-app:7150 --connect-push tcp://devicehub-triproxy-app:7170 --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-api:
build: .
image: vkcom/devicehub
container_name: devicehub-api
env_file:
- scripts/variables.env
command: stf api --port 3000 --connect-sub tcp://devicehub-triproxy-app:7150 --connect-push tcp://devicehub-triproxy-app:7170 --connect-sub-dev tcp://devicehub-triproxy-dev:7250 --connect-push-dev tcp://devicehub-triproxy-dev:7270 --secret=${STF_SECRET}
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
devicehub-api-groups-engine:
build: .
image: vkcom/devicehub
container_name: devicehub-api-groups-engine
env_file:
- scripts/variables.env
command: stf groups-engine --connect-sub tcp://devicehub-triproxy-app:7150 --connect-push tcp://devicehub-triproxy-app:7170 --connect-sub-dev tcp://devicehub-triproxy-dev:7250 --connect-push-dev tcp://devicehub-triproxy-dev:7270
depends_on:
devicehub-migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
devicehub:
volumes:
devicehub-db-volume: