-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
212 lines (201 loc) · 5.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
212 lines (201 loc) · 5.66 KB
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
version: '3.9'
services:
postgres:
image: postgres:18.1-2.1C-ubuntu2204
container_name: postgres-1c
restart: unless-stopped
environment:
POSTGRES_DB: template1c
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD:-ChangeMe123!}
ports:
- "0.0.0.0:5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- 1c-infrastructure
- monitoring
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d template1c"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
# =============================================================================
# postgres-exporter (обновлён для custom queries 1С)
# =============================================================================
postgres-exporter:
image: prometheuscommunity/postgres-exporter:latest
container_name: postgres-exporter
restart: unless-stopped
ports:
- "0.0.0.0:9187:9187"
environment:
DATA_SOURCE_NAME: "postgresql://postgres:${DB_PASSWORD}@postgres:5432/postgres?sslmode=disable"
PG_EXPORTER_EXTEND_QUERY_PATH: "/etc/postgres-exporter/custom-queries-1c.yml"
volumes:
- ./monitoring/custom-queries-1c.yml:/etc/postgres-exporter/custom-queries-1c.yml:ro
depends_on:
- postgres
networks:
- 1c-infrastructure
- monitoring
blackbox-exporter:
image: prom/blackbox-exporter:latest
container_name: blackbox-exporter
restart: unless-stopped
ports:
- "0.0.0.0:9115:9115"
networks:
- 1c-infrastructure
- monitoring
volumes:
- ./monitoring/blackbox.yml:/etc/blackbox/blackbox.yml:ro
command: ['--config.file=/etc/blackbox/blackbox.yml']
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin4
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@example.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
ports:
- "0.0.0.0:5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
depends_on:
- postgres
networks:
- 1c-infrastructure
- monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
mem_limit: 512m
mem_reservation: 256m
cpus: 1.0
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./monitoring/prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=3d'
- '--storage.tsdb.retention.size=256MB'
- '--web.enable-lifecycle'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.console.libraries=/etc/prometheus/console_libraries'
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
depends_on:
cadvisor:
condition: service_started
postgres-exporter:
condition: service_started
blackbox-exporter:
condition: service_started
networks:
- monitoring
- 1c-infrastructure
extra_hosts:
- "host.docker.internal:host-gateway"
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
privileged: true
ports:
- "0.0.0.0:8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
networks:
- 1c-infrastructure
- monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "0.0.0.0:3002:3000"
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-GrafanaMe123!}
GF_USERS_ALLOW_SIGN_UP: "false"
GF_ALERTING_ENABLED: "true"
GF_UNIFIED_ALERTING_ENABLED: "true"
GF_INSTALL_PLUGINS: ""
TZ: Europe/Moscow
volumes:
- grafana-data:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini
networks:
- 1c-infrastructure
- monitoring
depends_on:
- prometheus
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
ports:
- "0.0.0.0:9000:9000"
- "0.0.0.0:8000:8000"
volumes:
- portainer-data:/data
- //./pipe/docker_engine://./pipe/docker_engine
command:
- --host=tcp://host.docker.internal:2375
networks:
- 1c-infrastructure
- monitoring
vocechat-notifications:
image: privoce/vocechat-server:latest
container_name: vocechat-notifications
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Moscow
- ADMIN_EMAIL=monitoring@local
- ADMIN_PASSWORD=${VOCECHAT_NOTIFY_PASSWORD:-NotifyMe123!}
ports:
- "0.0.0.0:3001:3000"
volumes:
- vocechat-notify-data:/home/vocechat-server/data
networks:
- 1c-infrastructure
- monitoring
volumes:
postgres-data:
driver: local
pgadmin-data:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local
cadvisor-data:
driver: local
portainer-data:
driver: local
vocechat-notify-data:
driver: local
networks:
1c-infrastructure:
driver: bridge
monitoring:
driver: bridge