-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
docker-compose_v3_centos_mysql_local.yaml
282 lines (262 loc) · 7.81 KB
/
docker-compose_v3_centos_mysql_local.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
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
279
280
281
282
services:
zabbix-build-base:
build:
context: ./Dockerfiles/build-base/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
image: ${BUILD_BASE_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
attach: false
zabbix-build-mysql:
build:
context: ./Dockerfiles/build-mysql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
attach: false
depends_on:
- zabbix-build-base
zabbix-build-sqlite3:
build:
context: ./Dockerfiles/build-sqlite3/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
attach: false
profiles:
- all
depends_on:
- zabbix-build-base
zabbix-server:
extends:
file: compose_zabbix_components.yaml
service: server-mysql
build:
context: ./Dockerfiles/server-mysql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-server-mysql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
labels:
com.zabbix.description: "Zabbix server with MySQL database support"
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-proxy-sqlite3:
extends:
file: compose_zabbix_components.yaml
service: proxy-sqlite3
build:
context: ./Dockerfiles/proxy-sqlite3/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-proxy-sqlite3:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- zabbix-build-sqlite3
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-proxy-mysql:
extends:
file: compose_zabbix_components.yaml
service: proxy-mysql
build:
context: ./Dockerfiles/proxy-mysql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-proxy-mysql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-web-apache-mysql:
extends:
file: compose_zabbix_components.yaml
service: web-apache-mysql
build:
context: ./Dockerfiles/web-apache-mysql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-apache-mysql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-web-nginx-mysql:
extends:
file: compose_zabbix_components.yaml
service: web-nginx-mysql
build:
context: ./Dockerfiles/web-nginx-mysql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-nginx-mysql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-agent:
extends:
file: compose_zabbix_components.yaml
service: agent
build:
context: ./Dockerfiles/agent/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-agent:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-java-gateway:
extends:
file: compose_zabbix_components.yaml
service: java-gateway
build:
context: ./Dockerfiles/java-gateway/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-java-gateway:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-snmptraps:
extends:
file: compose_zabbix_components.yaml
service: snmptraps
build:
context: ./Dockerfiles/snmptraps/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
image: zabbix-snmptraps:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-web-service:
extends:
file: compose_zabbix_components.yaml
service: web-service
build:
context: ./Dockerfiles/web-service/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-service:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-mysql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
mysql-server:
extends:
file: compose_databases.yaml
service: mysql-server
db-data-mysql:
extends:
file: compose_databases.yaml
service: db-data-mysql
elasticsearch:
extends:
file: compose_databases.yaml
service: elasticsearch
selenium:
extends:
file: compose_additional_components.yaml
service: selenium
selenium-chrome:
platform: linux/amd64
extends:
file: compose_additional_components.yaml
service: selenium-chrome
selenium-firefox:
extends:
file: compose_additional_components.yaml
service: selenium-firefox
networks:
frontend:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${FRONTEND_ENABLE_IPV6}"
ipam:
driver: "${FRONTEND_NETWORK_DRIVER}"
config:
- subnet: "${FRONTEND_SUBNET}"
backend:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${BACKEND_ENABLE_IPV6}"
internal: true
ipam:
driver: "${BACKEND_NETWORK_DRIVER}"
config:
- subnet: "${BACKEND_SUBNET}"
database:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${DATABASE_NETWORK_ENABLE_IPV6}"
internal: true
ipam:
driver: "${DATABASE_NETWORK_DRIVER}"
tools_frontend:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${ADD_TOOLS_ENABLE_IPV6}"
ipam:
driver: "${ADD_TOOLS_NETWORK_DRIVER}"
config:
- subnet: "${ADD_TOOLS_SUBNET}"
volumes:
snmptraps:
# dbsocket:
secrets:
MYSQL_USER:
file: ${ENV_VARS_DIRECTORY}/.MYSQL_USER
MYSQL_PASSWORD:
file: ${ENV_VARS_DIRECTORY}/.MYSQL_PASSWORD
MYSQL_ROOT_USER:
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_USER
MYSQL_ROOT_PASSWORD:
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_PASSWORD
# client-key.pem:
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_KEY_FILE
# client-cert.pem:
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_CERT_FILE
# root-ca.pem:
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_CA_FILE
# server-cert.pem:
# file: ${ENV_VARS_DIRECTORY}/.DB_CERT_FILE
# server-key.pem:
# file: ${ENV_VARS_DIRECTORY}/.DB_KEY_FILE