-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
214 lines (206 loc) · 5.42 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
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
version: '2'
services:
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-3.4.4
ports:
- "10051:10051"
volumes:
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro
- ./zbx_env/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts:ro
- ./zbx_env/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts:ro
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
- ./zbx_env/var/lib/zabbix/mibs:/var/lib/zabbix/mibs:ro
volumes_from:
- zabbix-snmptraps:ro
links:
- mysql-server:mysql-server
- zabbix-java-gateway:zabbix-java-gateway
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
mem_limit: 512m
env_file:
- .env_db_mysql
- .env_srv
user: root
networks:
zbx_net:
aliases:
- zabbix-server
- zabbix-server-mysql
- zabbix-server-alpine-mysql
- zabbix-server-mysql-alpine
labels:
com.zabbix.description: "Zabbix server with MySQL database support"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "zabbix-server"
com.zabbix.dbtype: "mysql"
com.zabbix.os: "alpine"
zabbix-proxy-mysql:
image: zabbix/zabbix-proxy-mysql:alpine-3.4.4
ports:
- "10071:10051"
volumes:
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro
- ./zbx_env/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts:ro
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
- ./zbx_env/var/lib/zabbix/mibs:/var/lib/zabbix/mibs:ro
volumes_from:
- zabbix-snmptraps:ro
links:
- zabbix-server:zabbix-server
- zabbix-java-gateway:zabbix-java-gateway
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
mem_limit: 512m
env_file:
- .env_db_mysql_proxy
- .env_prx
- .env_prx_mysql
user: root
networks:
zbx_net:
aliases:
- zabbix-proxy-mysql
- zabbix-proxy-alpine-mysql
- zabbix-proxy-mysql-alpine
labels:
com.zabbix.description: "Zabbix proxy with MySQL database support"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "zabbix-proxy"
com.zabbix.dbtype: "mysql"
com.zabbix.os: "alpine"
zabbix-web-apache-mysql:
image: zabbix/zabbix-web-apache-mysql:alpine-3.4.4
ports:
- "80:80"
- "443:443"
links:
- mysql-server:mysql-server
- zabbix-server:zabbix-server
mem_limit: 512m
volumes:
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro
- ./zbx_env/etc/ssl/apache2:/etc/ssl/apache2:ro
env_file:
- .env_db_mysql
- .env_web
user: root
networks:
zbx_net:
aliases:
- zabbix-web-apache-mysql
- zabbix-web-apache-alpine-mysql
- zabbix-web-apache-mysql-alpine
labels:
com.zabbix.description: "Zabbix frontend on Apache web-server with MySQL database support"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "zabbix-frontend"
com.zabbix.webserver: "apache2"
com.zabbix.dbtype: "mysql"
com.zabbix.os: "alpine"
zabbix-agent:
image: zabbix/zabbix-agent:alpine-3.4.4
ports:
- "10050:10050"
volumes:
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro
- ./zbx_env/etc/zabbix/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
links:
- zabbix-server:zabbix-server
env_file:
- .env_agent
user: root
privileged: true
pid: "host"
networks:
zbx_net:
aliases:
- zabbix-agent
- zabbix-agent-passive
- zabbix-agent-alpine
labels:
com.zabbix.description: "Zabbix agent"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "zabbix-agentd"
com.zabbix.os: "alpine"
zabbix-java-gateway:
image: zabbix/zabbix-java-gateway:alpine-3.4.4
ports:
- "10052:10052"
env_file:
- .env_java
user: root
networks:
zbx_net:
aliases:
- zabbix-java-gateway
- zabbix-java-gateway-alpine
labels:
com.zabbix.description: "Zabbix Java Gateway"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "java-gateway"
com.zabbix.os: "alpine"
zabbix-snmptraps:
image: zabbix/zabbix-snmptraps:ubuntu-3.4.4
ports:
- "162:162/udp"
volumes:
- ./zbx_env/var/lib/zabbix/snmptraps:/var/lib/zabbix/snmptraps:rw
user: root
networks:
zbx_net:
aliases:
- zabbix-snmptraps
labels:
com.zabbix.description: "Zabbix snmptraps"
com.zabbix.company: "Zabbix SIA"
com.zabbix.component: "snmptraps"
com.zabbix.os: "ubuntu"
mysql-server:
image: mysql:5.7
command: [mysqld, --character-set-server=utf8, --collation-server=utf8_bin]
volumes_from:
- db_data_mysql
volume_driver: local
env_file:
- .env_db_mysql
user: root
networks:
zbx_net:
aliases:
- mysql-server
- zabbix-database
- mysql-database
db_data_mysql:
image: busybox
volumes:
- ./zbx_env/var/lib/mysql:/var/lib/mysql:rw
networks:
zbx_net:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1
# - subnet: 2001:3984:3989::/64
# gateway: 2001:3984:3989::1