-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (83 loc) · 1.99 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
version: "3.8"
services:
postgresdb:
image: postgres
restart: unless-stopped
env_file: ./.env
environment:
- POSTGRES_DB=$DB_NAME
- POSTGRES_USER=root
- POSTGRES_PASSWORD=$DB_PASS
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "root"]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
networks:
zabbix_network:
ipv4_address: 10.1.0.2
zabbix-server:
container_name: zabbix-server
image: zabbix/zabbix-server-pgsql:alpine-6.0-latest
links:
- postgresdb
restart: unless-stopped
ports:
- "10051:10051"
volumes:
- "./zabbix/alertscripts:/usr/lib/zabbix/alertscripts"
environment:
- DB_SERVER_HOST=postgresdb
- POSTGRES_DB=$DB_NAME
- POSTGRES_USER=root
- POSTGRES_PASSWORD=$DB_PASS
depends_on:
- postgresdb
healthcheck:
test: grep -qr "zabbix_server" /proc/*/status || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
networks:
zabbix_network:
ipv4_address: 10.1.0.3
zabbix-frontend:
container_name: zabbix-frontend
image: zabbix/zabbix-web-nginx-pgsql:alpine-6.0-latest
links:
- postgresdb
restart: unless-stopped
ports:
- "6500:8080"
environment:
- DB_SERVER_HOST=postgresdb
- POSTGRES_DB=$DB_NAME
- POSTGRES_USER=root
- POSTGRES_PASSWORD=$DB_PASS
- ZBX_SERVER_HOST=zabbix-server
- PHP_TZ=America/Sao_Paulo
depends_on:
- postgresdb
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
networks:
zabbix_network:
ipv4_address: 10.1.0.4
volumes:
db:
networks:
zabbix_network:
driver: bridge
ipam:
config:
- subnet: 10.1.0.0/24
gateway: 10.1.0.1