-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdocker-compose.yml
102 lines (96 loc) · 2.68 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
services:
zabbix-server:
image: ${ZABBIX_SERVER_IMAGE:-zabbix/zabbix-server-pgsql:ubuntu-7.2.1}
container_name: server
restart: unless-stopped
ports:
- "10051:10051"
environment:
DB_SERVER_HOST: postgres
DB_SERVER_PORT: 5432
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
depends_on:
- postgres
networks:
- network-zabbix
zabbix-frontend:
image: ${ZABBIX_FRONTEND_IMAGE:-zabbix/zabbix-web-nginx-pgsql:ubuntu-7.2.1}
restart: unless-stopped
container_name: frontend
ports:
- "8080:8080"
- "8443:8443"
environment:
DB_SERVER_HOST: postgres
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PHP_TZ: ${TZ}
ZBX_SERVER_HOST: zabbix-server
ZBX_SERVER_PORT: 10051
depends_on:
- zabbix-server
networks:
- network-zabbix
zabbix-agent:
image: ${ZABBIX_AGENT_IMAGE:-zabbix/zabbix-agent:ubuntu-7.2.1}
container_name: zabbix-agent
restart: unless-stopped
ports:
- "10050:10050"
environment:
ZBX_ACTIVE_ALLOW: false
TZ: ${TZ}
ZBX_SERVER_HOST: zabbix-server
ZBX_SERVER_PORT: 10051
ZBX_HOSTNAME: zabbix-agent
ZBX_HOSTNAMEITEM: system.hostname
depends_on:
- zabbix-server
networks:
- network-zabbix
postgres:
image: ${POSTGRES_IMAGE:-postgres:latest}
# command: -c ssl=on -c ssl_cert_file=/run/secrets/server-cert.pem -c ssl_key_file=/run/secrets/server-key.pem -c ssl_ca_file=/run/secrets/root-ca.pem
container_name: postgres
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
# - pgsql_socket:/var/run/postgresql/
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PG_DATA: /var/lib/postgresql/data/pgdata
networks:
- network-zabbix
grafana:
image: ${GRAFANA_IMAGE:-grafana/grafana}
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_SECRET:-12345}
GF_INSTALL_PLUGINS: alexanderzobnin-zabbix-app
TZ: ${TZ}
user: "472"
volumes:
- grafana:/var/lib/grafana
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
- zabbix-frontend
networks:
- network-zabbix
volumes:
postgres: {}
grafana: {}
networks:
network-zabbix:
driver: bridge