-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
95 lines (90 loc) · 2.17 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
version: '2'
services:
server:
image: zabbix/zabbix-server-mysql:latest
container_name: zabbix-server
depends_on:
- mysql
environment:
TZ: Asia/Shanghai
DB_SERVER_HOST: "mysql"
MYSQL_DATABASE: "zabbix"
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix_pwd"
MYSQL_ROOT_PASSWORD: "root_pwd"
ports:
- "10051:10051"
volumes:
- /etc/localtime:/etc/localtime:ro
links:
- mysql:zabbix-mysql
user: root
networks:
zabbixbr:
ipv4_address: 172.25.0.4
restart: always
web:
image: zabbix/zabbix-web-nginx-mysql:latest
container_name: zabbix-web
depends_on:
- mysql
- server
environment:
TZ: Asia/Shanghai
DB_SERVER_HOST: "mysql"
ZBX_SERVER_HOST: "server"
MYSQL_DATABASE: "zabbix"
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix_pwd"
MYSQL_ROOT_PASSWORD: "root_pwd"
volumes:
- ./zabbix/graphfont.ttf:/usr/share/zabbix/fonts/graphfont.ttf
- /etc/localtime:/etc/localtime:ro
links:
- mysql:zabbix-mysql
- server:zabbix-server
ports:
- "80:80"
user: root
networks:
zabbixbr:
ipv4_address: 172.25.0.5
restart: always
mysql:
image: mysql:5.7
container_name: zabbix-mysql
command: --character-set-server=utf8 --collation-server=utf8_general_ci
environment:
TZ: Asia/Shanghai
MYSQL_DATABASE: "zabbix"
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix_pwd"
MYSQL_ROOT_PASSWORD: "root_pwd"
networks:
zabbixbr:
ipv4_address: 172.25.0.3
volumes:
- /home/data/zabbix/database/mysql:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
restart: always
grafana:
image: grafana/grafana:latest
container_name: zabbix-grafana
environment:
TZ: Asia/Shanghai
ports:
- 3000:3000
volumes:
- /home/data/grafana:/var/lib/grafana
- ./grafana/plugins:/var/lib/grafana/plugins
networks:
zabbixbr:
ipv4_address: 172.25.0.2
restart: always
networks:
zabbixbr:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
gateway: 172.25.0.1