forked from nelsondev19/postgres-prom-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
89 lines (83 loc) · 2.11 KB
/
compose.yml
File metadata and controls
89 lines (83 loc) · 2.11 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
services:
postgres:
image: postgres:17
container_name: postgres
restart: unless-stopped
ports:
- 5432:5432
volumes:
- ./volumes/database:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
POSTGRES_DB: shop
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
grafana:
image: grafana/grafana:10.2.2
container_name: grafana
ports:
- 3000:3000
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana_dev
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
prometheus:
image: prom/prometheus:v2.48.0
container_name: prometheus
ports:
- 9090:9090
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
depends_on:
- mimir
postgres-exporter:
image: prometheuscommunity/postgres-exporter:v0.18.1
container_name: postgres-exporter
ports:
- 9187:9187
environment:
- DATA_SOURCE_NAME=postgres://postgres:postgrespassword@postgres:5432/shop?sslmode=disable
- PG_EXPORTER_DISABLE_COLLECTORS=stat_bgwriter
links:
- prometheus
- postgres
depends_on:
- postgres
minio:
image: minio/minio
container_name: minio
entrypoint: sh
command: /init.sh
ports:
- 9001:9001
- 9000:9000
environment:
- MINIO_ROOT_USER=mimir
- MINIO_ROOT_PASSWORD=supersecret
volumes:
- ./volumes/minio-data:/data
- ./minio/init.sh:/init.sh:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
mimir:
image: grafana/mimir:latest
container_name: mimir
command: ["-config.file=/etc/mimir.yaml"]
hostname: mimir
ports:
- 9009:9009
depends_on:
minio:
condition: service_healthy
volumes:
- ./mimir/mimir.yaml:/etc/mimir.yaml
- ./volumes/mimir-data:/data