forked from sunsharing-note/zabbix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-server.yaml
83 lines (78 loc) · 2.04 KB
/
docker-compose-server.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
version: "3"
services:
zabbix-server:
image: "zabbix/zabbix-server-mysql:centos-4.0.4"
container_name: "zabbix-server"
network_mode: "host"
restart: "always"
environment:
- "DB_SERVER_HOST=127.0.0.1"
- "MYSQL_DATABASE: zabbix"
- "MYSQL_USER=root"
- "MYSQL_PASSWORD=A1b2c3#4"
- "MYSQL_ROOT_PASSWORD: A1b2c3#4"
#- "DB_SERVER_PORT="
#- "MYSQL_DATABASE="
volumes:
- "zabbix-server-data:/var/lib/zabbix/"
- "zabbix-server-scripts:/usr/lib/zabbix/"
depends_on:
- "zabbix-db"
ports:
- "10051:10051"
zabbix-web:
image: "zabbix/zabbix-web-nginx-mysql:centos-4.0.4"
container_name: "zabbix-web"
restart: "always"
environment:
- "DB_SERVER_HOST=zabbix-db"
- "MYSQL_DATBASE=zabbix"
- "MYSQL_USER=root"
- "MYSQL_PASSWORD=A1b2c3#4"
- "ZBX_SERVER_HOST=192.168.1.1"
- "PHP_TZ=Asia/Shanghai "
#- "ZBX_SERVER_PORT="
#- "DB_SERVER_PORT="
#- "MYSQL_DATABASE="
#- "ZBX_SERVER_NAME="
depends_on:
- "zabbix-server"
- "zabbix-db"
ports:
- "80:80"
#extra_hosts:
# - "mysql.bboysoul.com:10.10.10.200"
zabbix-db:
image: "mariadb:10.2.22"
container_name: "zabbix-db"
restart: "always"
environment:
- "MYSQL_ROOT_PASSWORD=A1b2c3#4"
- "MYSQL_DATABASE=zabbix"
- "MYSQL_USER=root"
- "MYSQL_PASSWORD=A1b2c3#4"
#- "MYSQL_USER="
#- "MYSQL_PASSWORD="
#- "MYSQL_ALLOW_EMPTY_PASSWORD="
#- "MYSQL_RANDOM_ROOT_PASSWORD="
ports:
- "3306:3306"
volumes:
- "zabbix-db-data:/var/lib/mysql/"
zabbix-agent:
image: "zabbix/zabbix-agent:centos-4.0.4"
container_name: "zabbix-agent"
network_mode: "host"
restart: "always"
ports:
- "10050:10050"
volumes:
- "zabbix-agent-conf:/etc/zabbix/"
environment:
- "ZBX_HOSTNAME=zabbix server"
- "ZBX_SERVER_HOST=127.0.0.1"
volumes:
zabbix-server-data:
zabbix-db-data:
zabbix-server-scripts:
zabbix-agent-conf: