-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
278 lines (256 loc) · 6.63 KB
/
docker-compose.yml
File metadata and controls
278 lines (256 loc) · 6.63 KB
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
version: '2'
services:
##
# Autodiscovery : Consul
##
autodiscovery:
build: ./autodiscovery/
mem_limit: 128m
expose:
- 53
- 8300
- 8301
- 8302
- 8400
- 8500
ports:
- 8500:8500
dns:
- 127.0.0.1
##
# Battle Microservice
##
microservice_battle_fpm:
build: ./microservices/battle/php-fpm/
volumes_from:
- source_battle
links:
- autodiscovery
- microservice_user_nginx
expose:
- 9000
environment:
- BACKEND=microservice-battle-nginx
- CONSUL=autodiscovery
microservice_battle_nginx:
build: ./microservices/battle/nginx/
volumes_from:
- source_battle
links:
- autodiscovery
- microservice_battle_fpm
environment:
- BACKEND=microservice-battle-fpm
- CONSUL=autodiscovery
ports:
- 8443:443
- 8081:80
- 9091:9090
##
# Location Microservice
##
microservice_location_fpm:
build: ./microservices/location/php-fpm/
volumes_from:
- source_location
links:
- autodiscovery
- microservice_location_redis
expose:
- 9000
environment:
- BACKEND=microservice-location-nginx
- CONSUL=autodiscovery
microservice_location_nginx:
build: ./microservices/location/nginx/
volumes_from:
- source_location
links:
- autodiscovery
- microservice_location_fpm
environment:
- BACKEND=microservice-location-fpm
- CONSUL=autodiscovery
ports:
- 8082:80
- 9092:9090
microservice_location_redis:
build: ./microservices/location/redis/
links:
- autodiscovery
expose:
- 6379
ports:
- 6380:6379
##
# Secret Microservice
##
microservice_secret_fpm:
build: ./microservices/secret/php-fpm/
volumes_from:
- source_secret
links:
- autodiscovery
- microservice_secret_database
expose:
- 9000
environment:
- BACKEND=microservice-secret-nginx
- CONSUL=autodiscovery
microservice_secret_nginx:
build: ./microservices/secret/nginx/
volumes_from:
- source_secret
links:
- autodiscovery
- microservice_secret_fpm
environment:
- BACKEND=microservice-secret-fpm
- CONSUL=autodiscovery
ports:
- 8083:80
- 9093:9090
microservice_secret_database:
build: ./microservices/secret/database/
environment:
- CONSUL=autodiscovery
- MYSQL_ROOT_PASSWORD=mysecret
- MYSQL_DATABASE=finding_secrets
- MYSQL_USER=secret
- MYSQL_PASSWORD=mysecret
ports:
- 6666:3306
microservice_secret_database_mariadb:
build: ./microservices/secret/mariadb/
environment:
- CONSUL=autodiscovery
- MYSQL_ROOT_PASSWORD=mysecret
- MYSQL_DATABASE=finding_secrets
- MYSQL_USER=secret
- MYSQL_PASSWORD=mysecret
ports:
- 7777:3306
##
# User Microservice
##
microservice_user_fpm:
build: ./microservices/user/php-fpm/
volumes_from:
- source_user
links:
- autodiscovery
- microservice_secret_nginx
- microservice_user_redis
expose:
- 9000
environment:
- BACKEND=microservice-user-nginx
- CONSUL=autodiscovery
microservice_user_nginx:
build: ./microservices/user/nginx/
volumes_from:
- source_user
links:
- autodiscovery
- microservice_user_fpm
environment:
- BACKEND=microservice-user-fpm
- CONSUL=autodiscovery
ports:
- 8084:80
- 9094:9090
microservice_user_redis:
build: ./microservices/user/redis/
links:
- autodiscovery
expose:
- 6379
ports:
- 6379:6379
##
# Telemetry: prometheus
##
telemetry:
build: ./telemetry/
links:
- autodiscovery
expose:
- 9090
ports:
- 9090:9090
##
# Sentry
##
sentry_redis:
image: redis
expose:
- 6379
sentry_postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
expose:
- 5432
sentry:
image: sentry
links:
- sentry_redis
- sentry_postgres
ports:
- 9876:9000
environment:
SENTRY_SECRET_KEY: mymicrosecret
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
sentry_celery-beat:
image: sentry
links:
- sentry_redis
- sentry_postgres
command: sentry celery beat
environment:
SENTRY_SECRET_KEY: mymicrosecret
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
sentry_celery-worker:
image: sentry
links:
- sentry_redis
- sentry_postgres
command: sentry celery worker
environment:
SENTRY_SECRET_KEY: mymicrosecret
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
##
# Source containers
##
source_battle:
image: nginx:stable
volumes:
- ../source/battle:/var/www/html
command: "true"
source_location:
image: nginx:stable
volumes:
- ../source/location:/var/www/html
command: "true"
source_secret:
image: nginx:stable
volumes:
- ../source/secret:/var/www/html
command: "true"
source_user:
image: nginx:stable
volumes:
- ../source/user:/var/www/html
command: "true"