-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
142 lines (132 loc) · 3.56 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
---
version: "3.7"
services:
etcd-store:
image: quay.io/coreos/etcd:v3.2.17
restart: on-failure
entrypoint:
- etcd
command:
- --data-dir=/data
- --listen-client-urls=http://0.0.0.0:2379
- --advertise-client-urls=http://0.0.0.0:2379
volumes:
- etcd-store-data:/data
ports:
- "127.0.0.1:2379:2379"
networks:
default:
aliases:
- etcd-store
sentinel:
image: &stolonDevelopmentImage gocardless/stolon-development:2022042601
restart: on-failure
depends_on:
- etcd-store
entrypoint:
- /usr/local/bin/stolon-sentinel
- --cluster-name=main
- --store-backend=etcdv3
- --store-endpoints=etcd-store:2379
- --metrics-listen-address=0.0.0.0:9459
pgbouncer:
hostname: pgbouncer
image: *stolonDevelopmentImage
command:
- /stolon-pgbouncer/docker/stolon-development/supervisord-pgbouncer.conf
restart: on-failure
volumes:
- .:/stolon-pgbouncer
ports:
- "127.0.0.1:6432:6432"
depends_on:
- keeper0
- keeper1
- keeper2
keeper0:
hostname: keeper0
image: *stolonDevelopmentImage
command:
- /stolon-pgbouncer/docker/stolon-development/supervisord.conf
restart: on-failure
volumes:
- keeper0-data:/data
- keeper0-wal:/wal
- .:/stolon-pgbouncer
environment:
- WAL_DIR=/wal
ports:
- "127.0.0.1:6433:6432"
depends_on:
- sentinel
keeper1:
hostname: keeper1
image: *stolonDevelopmentImage
command:
- /stolon-pgbouncer/docker/stolon-development/supervisord.conf
restart: on-failure
volumes:
- keeper1-data:/data
- keeper1-wal:/wal
- .:/stolon-pgbouncer
environment:
- WAL_DIR=/wal
ports:
- "127.0.0.1:6434:6432"
depends_on:
- sentinel
keeper2:
hostname: keeper2
image: *stolonDevelopmentImage
command:
- /stolon-pgbouncer/docker/stolon-development/supervisord.conf
restart: on-failure
volumes:
- keeper2-data:/data
- .:/stolon-pgbouncer
ports:
- "127.0.0.1:6435:6432"
depends_on:
- sentinel
prometheus:
image: prom/prometheus
volumes:
- ./docker/observability/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./docker/observability/prometheus/rules.yml:/etc/prometheus/rules.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
ports:
- "127.0.0.1:9090:9090"
grafana:
image: grafana/grafana
depends_on:
- prometheus
volumes:
- ./docker/observability/grafana/dashboards:/var/lib/grafana/dashboards
- ./docker/observability/grafana/dashboard-provisioner.yml:/etc/grafana/provisioning/dashboards/provisioner.yml
- ./docker/observability/grafana/datasource-provisioner.yml:/etc/grafana/provisioning/datasources/provisioner.yml
- grafana-data:/var/lib/grafana
user: "472"
ports:
- "127.0.0.1:3000:3000"
restart: always
# Persist etcd and keeper data across docker restarts. This enables our cluster
# to outlive killing our containers, as the keepers otherwise complain that
# their data went missing.
volumes:
etcd-store-data:
keeper0-data:
keeper1-data:
keeper2-data:
keeper0-wal:
keeper1-wal:
prometheus-data:
grafana-data:
networks:
default:
driver: bridge