-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
169 lines (158 loc) · 3.55 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: '3.7'
services:
postgres:
container_name: postgres
build:
context: .
dockerfile: postgres/dockerfile.postgres
restart: unless-stopped
ports:
- 5433:5432
volumes:
- ./postgres/postgresql.conf:/usr/local/etc/postgres/postgresql.conf
- postgres_log:/var/lib/pgsql/data
command: postgres -c config_file=/usr/local/etc/postgres/postgresql.conf
networks:
- backend_network
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M
cadastrol-server:
container_name: cadastrol-server
build:
context: .
dockerfile: src/dockerfile.java-maven
restart: unless-stopped
ports:
- 8090:8090
depends_on:
- postgres
networks:
- backend_network
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
memory: 128M
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx/dockerfile.nginx
restart: unless-stopped
ports:
- 8000:8000
volumes:
- nginx_log:/tmp
depends_on:
- cadastrol-server
networks:
- backend_network
node-exporter:
container_name: node-exporter
image: prom/node-exporter
restart: unless-stopped
ports:
- 9100:9100
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- node-exporter:/node-exporter
networks:
- backend_network
cadvisor:
container_name: cadvisor
image: google/cadvisor:latest
restart: unless-stopped
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- backend_network
pg-exporter:
container_name: pg-exporter
restart: unless-stopped
build:
context: .
dockerfile: postgres/dockerfile.pg-exporter
ports:
- 9630:9630
volumes:
- pg-exporter_log:/pg-exporter
depends_on:
- postgres
networks:
- backend_network
prometheus:
container_name: prometheus
build:
context: .
dockerfile: prometheus/dockerfile.prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.enable-admin-api'
- '--web.enable-lifecycle'
restart: unless-stopped
ports:
- 9090:9090
volumes:
- prometheus_log:/prometheus
depends_on:
- nginx
- node-exporter
- cadvisor
- pg-exporter
networks:
- backend_network
grafana:
container_name: grafana
build:
context: .
dockerfile: grafana/dockerfile.grafana
restart: unless-stopped
ports:
- 3000:3000
volumes:
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- grafana_log:/usr/share/grafana
depends_on:
- prometheus
networks:
- backend_network
alertmanager:
container_name: alertmanager
build:
context: .
dockerfile: prometheus/alertmanager/dockerfile.alertmanager
command: --config.file=/home/alertmanager.yml
restart: unless-stopped
ports:
- 9093:9093
volumes:
- alertmanager_log:/rootfs
networks:
- backend_network
volumes:
postgres_log:
nginx_log:
node-exporter:
cadvisor_log:
pg-exporter_log:
prometheus_log:
grafana_log:
alertmanager_log:
networks:
backend_network:
name: backend_network