-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
85 lines (81 loc) · 1.97 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
version: "2.4"
name: grafana-migrator
services:
grafana-sqlite:
networks:
- grafananet
image: grafana/grafana:latest
ports:
- "3001:3000"
volumes:
- ./test/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana_sqlite:/var/lib/grafana
env_file:
- ./test/grafana/setup.env
healthcheck:
test: wget --spider http://localhost:3000/robots.txt
interval: 5s
timeout: 3s
retries: 3
depends_on:
- prometheus
sqlite-to-postgres:
command: /grafanadb/grafana.db "postgres://postgres:postgres@postgres_grafana:5432/grafana?sslmode=disable"
networks:
- grafananet
image: grafana-sqlite-to-postgres
volumes:
- grafana_sqlite:/grafanadb:ro
build: ./
depends_on:
postgres:
condition: service_healthy
grafana-sqlite:
condition: service_healthy
grafana-postgres:
networks:
- grafananet
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_DATABASE_URL: "postgres://postgres:postgres@postgres/grafana"
env_file:
- ./test/grafana/setup.env
healthcheck:
test: wget --spider http://localhost:3000/robots.txt
interval: 5s
timeout: 3s
retries: 3
depends_on:
postgres:
condition: service_healthy
prometheus:
user: root
networks:
- grafananet
image: prom/prometheus:latest
volumes:
- ./test/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9090:9090"
postgres:
networks:
- grafananet
image: postgres:alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: grafana
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD", "psql", "-U", "postgres", "grafana", "-c", "select 1;"]
interval: 5s
timeout: 3s
retries: 3
networks:
grafananet:
volumes:
grafana_sqlite: