-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
145 lines (135 loc) · 3.88 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
volumes:
zabbixdb_data:
driver: local
grafanadb_data:
driver: local
pgadmin_data:
driver: local
services:
zabbix-server:
hostname: zabbix-server
restart: unless-stopped
image: zabbix/zabbix-server-pgsql:alpine-${ZABBIX_VERSION}
environment:
- DB_SERVER_PORT=5432
- DB_SERVER_HOST=timescaledb
- POSTGRES_DB=zabbix
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=zabbix
- ENABLE_TIMESCALEDB=true
- ZBX_STARTREPORTWRITERS=2
- ZBX_WEBSERVICEURL=http://zabbix-reports:10053/report
volumes:
- ./zabbix/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts:ro
depends_on:
- timescaledb
zabbix-frontend:
hostname: zabbix-frontend
restart: unless-stopped
image: zabbix/zabbix-web-apache-pgsql:alpine-${ZABBIX_VERSION}
environment:
- DB_SERVER_PORT=5432
- DB_SERVER_HOST=timescaledb
- POSTGRES_DB=zabbix
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=zabbix
- PHP_TZ=America/Sao_Paulo
- ZBX_SERVER_NAME=zabbix-server
- ZBX_SERVER_HOST=zabbix-server
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./zabbix/etc/ssl/apache2:/etc/ssl/apache2:ro
depends_on:
- timescaledb
- zabbix-server
timescaledb:
hostname: timescaledb
restart: unless-stopped
image: timescale/timescaledb:2.14.2-pg15-oss
environment:
- POSTGRES_DB=zabbix
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=zabbix
- TS_TUNE_MEMORY=2GB
- TS_TUNE_NUM_CPUS=2
volumes:
- zabbixdb_data:/var/lib/postgresql/data
command: ["postgres", "-c", "max_connections=100"]
zabbix-agent:
hostname: zabbix-agent
restart: unless-stopped
image: zabbix/zabbix-agent:alpine-${ZABBIX_VERSION}
environment:
- ZBX_HOSTNAME=zabbix-agent
- ZBX_SERVER_HOST=zabbix-server
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./zabbix/etc/zabbix/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro
- ./zabbix/frontend_hacks:/usr/share/zabbix/local/
depends_on:
- zabbix-server
zabbix-reports:
hostname: zabbix-reports
restart: unless-stopped
image: zabbix/zabbix-web-service:alpine-${ZABBIX_VERSION}
environment:
- ZBX_ALLOWEDIP=zabbix-server,zabbix-frontend
cap_add:
- SYS_ADMIN
depends_on:
- zabbix-server
- zabbix-frontend
grafana:
hostname: grafana
restart: unless-stopped
image: grafana/grafana:${GRAFANA_VERSION}
environment:
- GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app ${GFN_ZBX_PLUGIN_VERSION}
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=alexanderzobnin-zabbix-datasource
- GF_LOG_LEVEL=debug
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=mailhog:1025
- GF_SMTP_USER=
- GF_SMTP_PASSWORD=
- GF_SMTP_CERT_FILE=
- GF_SMTP_KEY_FILE=
- GF_SMTP_EHLO_IDENTITY=
- GF_SMTP_SKIP_VERIFY=false
- GF_SMTP_NAME=Grafana-ZabbixLab
volumes:
- grafanadb_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
- zabbix-frontend
zapix:
hostname: zapix
restart: unless-stopped
build:
context: ./zapix
depends_on:
- zabbix-frontend
pgadmin:
hostname: pgadmin
restart: unless-stopped
image: thajeztah/pgadmin4
volumes:
- pgadmin_data:/pgadmin
depends_on:
- timescaledb
mailhog:
hostname: mailhog
restart: unless-stopped
image: mailhog/mailhog:v1.0.0
environment:
- MH_HOSTNAME=mailhog
zabbix-provisioning:
hostname: zabbix-provisioning
image: python:3.8.5-alpine3.12
command: ["python", "/tmp/provisioning.py"]
volumes:
- ./zabbix/provisioning.py:/tmp/provisioning.py:ro
depends_on:
- zabbix-frontend