-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
241 lines (233 loc) · 6.5 KB
/
docker-compose.yml
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
# Zabbix | Postgres | Grafana | PhpIPAM
version: "3.7"
services:
zb-server: ### ZABBIX ------------------------------------- ZB SERVER
container_name: zb-server
hostname: zb-server
image: zabbix/zabbix-server-pgsql:alpine-5.0-latest
restart: unless-stopped
environment:
DB_SERVER_HOST: pg-zb-server
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: zabbix
ZBX_HISTORYSTORAGETYPES: log,text
ZBX_DEBUGLEVEL: 1
ZBX_HOUSEKEEPINGFREQUENCY: 1
ZBX_MAXHOUSEKEEPERDELETE: 5000
ZBX_CACHESIZE: 500M
ZBX_CACHEUPDATEFREQUENCY: 60
ZBX_STARTPINGERS: 5
ZBX_HISTORYCACHESIZE: 64M
ZBX_HISTORYINDEXCACHESIZE: 16M
depends_on:
- pg-zb-server
links:
- pg-zb-server
volumes:
- /var/zb-server-alerts:/usr/lib/zabbix/alertscripts
- /var/zb-server-mibs:/var/lib/zabbix/mibs
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
networks:
default:
aliases:
- zb-server ## Set Alias
pg-zb-server: ### ZABBIX ----------------------------------- |DB|> ZB-SERVER|ZB-WEB
container_name: pg-zb-server
hostname: pg-zb-server
image: postgres:12.4-alpine
restart: unless-stopped
environment:
TZ: "America/Sao_Paulo"
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: zabbix
PG_DATA: /var/lib/postgresql/data/pgdata
ports:
- 8097:5432
volumes:
- /var/pg-zb-server:/var/lib/postgresql/data
- ./MIGRATE/ZABBIX-DB.gz:/MIGRATE.gz
networks:
default:
aliases:
- pg-zb-server ## Set Alias
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
zb-web: ### ZABBIX ---------------------------------------- WEB
container_name: zb-web
hostname: zb-web
image: zabbix/zabbix-web-nginx-pgsql:alpine-5.0-latest
restart: unless-stopped
environment:
DB_SERVER_HOST: pg-zb-server
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: zabbix
ZBX_SERVER_HOST: zb-server
ZBX_POSTMAXSIZE: 64M
PHP_TZ: "America/Sao_Paulo"
ZBX_MAXEXECUTIONTIME: 500
depends_on:
- zb-server # ZB server
- pg-zb-server # PG Zabbix
links:
- pg-zb-server
- zb-server
ports:
- 8090:8080
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
networks:
default:
aliases:
- zb-web ## Set Alias
zb-agent: ### ZABBIX ---------------------------------------- AGENT
container_name: zb-agent
hostname: zb-agent
image: zabbix/zabbix-agent:alpine-5.0-latest
privileged: true
restart: unless-stopped
environment:
- ZBX_HOSTNAME=zb-server
- ZBX_SERVER_HOST=zb-server
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 64M
links:
- zb-server
networks:
default:
aliases:
- zb-agent ## Set Alias
gf-web: ### GRAFANA ---------------------------------------- WEB
container_name: gf-web
hostname: gf-web
image: grafana/grafana:7.2.1
ports:
- 8091:3000
depends_on:
- pg-grafana
links:
- pg-grafana
environment:
- GF_INSTALL_IMAGE_RENDERER_PLUGIN=true
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=alexanderzobnin-zabbix-datasource
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,alexanderzobnin-zabbix-app
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- GF_SERVER_ROOT_URL=${GF_SERVER_ROOT_URL}
- GF_DATABASE_HOST=pg-grafana:5432
- GF_DATABASE_NAME=grafana
- GF_DATABASE_USER=${GF_DATABASE_USER}
- GF_DATABASE_PASSWORD=${GF_DATABASE_PASSWORD}
- GF_DATABASE_TYPE=postgres
- GF_SESSION_PROVIDER=postgres
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
networks:
default:
aliases:
- gf-web ## Set Alias
pg-grafana: ### POSTGRE PARA O GRAFANA ---------------------------------------- DB GRAFANA-WEB
container_name: pg-grafana
hostname: pg-grafana
image: postgres:12.2-alpine
restart: unless-stopped
ports:
- 8096:5432
environment:
POSTGRES_DB: grafana
POSTGRES_USER: ${GF_DATABASE_USER}
POSTGRES_PASSWORD: ${GF_DATABASE_PASSWORD}
PG_DATA: /var/lib/postgresql/data/pgdata
volumes:
- /var/pg-grafana-data:/var/lib/postgresql/data
networks:
default:
aliases:
- pg-grafana ## Set Alias
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
phpipam-web: ### PHPIPAM ---------------------------------------- WEB
container_name: phpipam-web
hostname: phpipam-web
image: phpipam/phpipam-www:1.4x
ports:
- 8092:80
environment:
- TZ=America/Sao_Paulo
- IPAM_DATABASE_HOST=phpipam-mariadb
- IPAM_DATABASE_PASS=${IPAM_DATABASE_PASS}
- IPAM_DATABASE_WEBHOST=%
restart: unless-stopped
volumes:
- /var/phpipam-logo:/phpipam/css/images/logo
- ./MIGRATE/PHPIPAM.gz:/phpipam/db/MIGRATE.gz
depends_on:
- phpipam-mariadb
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
phpipam-mariadb: ### PHPIPAM ---------------------------------------- DB WEB
container_name: phpipam-mariadb
hostname: phpipam-mariadb
image: mariadb:10.5.5
ports:
- 8095:3306
environment:
MYSQL_ROOT_PASSWORD: ${IPAM_DATABASE_PASS}
restart: unless-stopped
volumes:
- /var/phpipam-db-data:/var/lib/mysql
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
phpipam-cron: ### Cron
container_name: phpipam-cron
hostname: phpipam-cron
image: phpipam/phpipam-cron:latest
environment:
- TZ=America/Sao_Paulo
- IPAM_DATABASE_HOST=phpipam-mariadb
- IPAM_DATABASE_PASS=${IPAM_DATABASE_PASS}
- SCAN_INTERVAL=1h
restart: unless-stopped
depends_on:
- phpipam-mariadb
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 64M