forked from zabbix/zabbix-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose_v3_centos_pgsql_local.yaml
303 lines (280 loc) · 8.17 KB
/
docker-compose_v3_centos_pgsql_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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
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-pgsql:
build:
context: ./Dockerfiles/build-pgsql/${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_PGSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
attach: false
depends_on:
- zabbix-build-base
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
profiles:
- all
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-pgsql
build:
context: ./Dockerfiles/server-pgsql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-server-pgsql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- postgres-server
- zabbix-build-pgsql
labels:
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-pgsql:
extends:
file: compose_zabbix_components.yaml
service: web-apache-pgsql
build:
context: ./Dockerfiles/web-apache-pgsql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-apache-pgsql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- postgres-server
- zabbix-build-pgsql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
zabbix-web-nginx-pgsql:
extends:
file: compose_zabbix_components.yaml
service: web-nginx-pgsql
build:
context: ./Dockerfiles/web-nginx-pgsql/${CENTOS_OS_TAG_SHORT}
cache_from:
- "${CENTOS_CACHE_FROM}"
args:
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-nginx-pgsql:${ZABBIX_CENTOS_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- postgres-server
- zabbix-build-pgsql
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-pgsql
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-pgsql
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-pgsql
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-pgsql
labels:
com.zabbix.os: "${CENTOS_OS_TAG}"
mysql-server:
profiles:
- all
extends:
file: compose_databases.yaml
service: mysql-server
postgres-server:
extends:
file: compose_databases.yaml
service: postgres-server
db-data-mysql:
profiles:
- all
extends:
file: compose_databases.yaml
service: db-data-mysql
db-data-pgsql:
extends:
file: compose_databases.yaml
service: db-data-pgsql
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
POSTGRES_USER:
file: ${ENV_VARS_DIRECTORY}/.POSTGRES_USER
POSTGRES_PASSWORD:
file: ${ENV_VARS_DIRECTORY}/.POSTGRES_PASSWORD