-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
266 lines (258 loc) · 8.05 KB
/
docker-compose.yaml
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
services:
postgres:
image: postgis/postgis:${POSTGRESQL_VERSION:-16}-3.4
platform: linux/amd64
command:
- -F # turn fsync off for speed
- -N 1000 # increase max connections from 100 so we can run more HGEs
ports:
- 64002:5432
environment:
POSTGRES_PASSWORD: "password"
volumes:
- type: tmpfs
target: /var/lib/postgresql/data
- type: bind
source: ./static/empty-database.sql
target: /docker-entrypoint-initdb.d/01-empty-database.sql
read_only: true
- type: bind
source: ./static/chinook-postgres.sql
target: /docker-entrypoint-initdb.d/02-chinook-postgres.sql
read_only: true
- type: bind
source: ./static/composite-types-simple.sql
target: /docker-entrypoint-initdb.d/03-composite-simple.sql
read_only: true
- type: bind
source: ./static/composite-types-comments.sql
target: /docker-entrypoint-initdb.d/04-composite-types-comments.sql
read_only: true
- type: bind
source: ./static/composite-types-complex.sql
target: /docker-entrypoint-initdb.d/05-composite-complex.sql
read_only: true
- type: bind
source: ./static/custom-tables.sql
target: /docker-entrypoint-initdb.d/06-custom-tables.sql
read_only: true
- type: bind
source: ./static/domain-types.sql
target: /docker-entrypoint-initdb.d/07-domain-types.sql
read_only: true
- type: bind
source: ./static/enum-types.sql
target: /docker-entrypoint-initdb.d/08-enum-types.sql
read_only: true
- type: bind
source: ./static/institution.sql
target: /docker-entrypoint-initdb.d/09-institution.sql
read_only: true
# The script to copy the database template for mutations tests should
# come in last in order to capture all aspects.
- type: bind
source: ./static/copy-chinook.sql
target: /docker-entrypoint-initdb.d/10-copy-chinook.sql
read_only: true
healthcheck:
test:
- CMD-SHELL
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
cockroach:
image: cockroachdb/cockroach:latest-v23.1
command:
- start-single-node
- --insecure
- --accept-sql-without-tls
init: true # doesn't shut down properly without this
ports:
- 64003:26257
environment:
COCKROACH_USER: "postgres"
volumes:
- type: tmpfs
target: /cockroach/cockroach-data
- type: bind
source: ./static/chinook-postgres.sql
target: /docker-entrypoint-initdb.d/chinook-postgres.sql
read_only: true
- type: bind
source: ./static/composite-types-simple.sql
target: /docker-entrypoint-initdb.d/01-composite-simple.sql
read_only: true
- type: bind
source: ./static/enum-types.sql
target: /docker-entrypoint-initdb.d/02-enum-types.sql
read_only: true
healthcheck:
test:
- CMD-SHELL
- cockroach sql --insecure --execute "select 1;"
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
citus:
image: citusdata/citus:12.1.1
platform: linux/amd64
command:
- -F # turn fsync off for speed
- -N 1000 # increase max connections from 100 so we can run more HGEs
- "-cclient_min_messages=error"
ports:
- 64004:5432
environment:
POSTGRES_PASSWORD: "password" # you probably want to override this
volumes:
- type: tmpfs
target: /var/lib/postgresql/data
- type: bind
source: ./static/chinook-postgres.sql
target: /docker-entrypoint-initdb.d/00-chinook-postgres.sql
read_only: true
- type: bind
source: ./static/composite-types-simple.sql
target: /docker-entrypoint-initdb.d/01-composite-types-simple.sql
read_only: true
- type: bind
source: ./static/composite-types-comments.sql
target: /docker-entrypoint-initdb.d/02-composite-types-comments.sql
read_only: true
- type: bind
source: ./static/composite-types-complex.sql
target: /docker-entrypoint-initdb.d/03-composite-types-complex.sql
read_only: true
- type: bind
source: ./static/domain-types.sql
target: /docker-entrypoint-initdb.d/04-domain-types.sql
read_only: true
- type: bind
source: ./static/enum-types.sql
target: /docker-entrypoint-initdb.d/05-enum-types.sql
read_only: true
healthcheck:
test:
- CMD-SHELL
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
yugabyte:
image: yugabytedb/yugabyte:2.19.3.0-b140
platform: linux/amd64
# we use a custom script to start Yugabyte and then load Chinook data
command:
- ./start.sh
ports:
- 64005:5433
volumes:
- type: tmpfs
target: /root/var
- type: bind
source: ./static/chinook-postgres.sql
target: /home/yugabyte/00-chinook-postgres.sql
read_only: true
- type: bind
source: ./static/composite-types-simple.sql
target: /home/yugabyte/01-composite-types-simple.sql
read_only: true
- type: bind
source: ./static/composite-types-comments.sql
target: /home/yugabyte/02-composite-types-comments.sql
read_only: true
- type: bind
source: ./static/composite-types-complex.sql
target: /home/yugabyte/03-composite-types-complex.sql
read_only: true
- type: bind
source: ./static/domain-types.sql
target: /home/yugabyte/04-domain-types.sql
read_only: true
- type: bind
source: ./static/enum-types.sql
target: /home/yugabyte/05-enum-types.sql
read_only: true
- type: bind
source: ./static/yugabyte/start.sh
target: /home/yugabyte/start.sh
read_only: true
healthcheck:
test:
- CMD-SHELL
- |
set -e
./bin/ysqlsh < /dev/null # ensure we can connect
[[ -f /root/var/test-data.loaded ]] # check that the Chinook data has finished loading
start_period: 10s
interval: 10s
timeout: 10s
retries: 20
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- 9090:9090
restart: unless-stopped
volumes:
- type: bind
source: ./metrics/prometheus/prometheus.yml
target: /etc/prometheus/prometheus.yml
- type: volume
source: prom_data
target: /prometheus
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3001:3000
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
volumes:
- type: bind
source: ./metrics/grafana
target: /etc/grafana/provisioning/datasources
read_only: true
- type: bind
source: ./metrics/grafana/dashboard.yaml
target: /etc/grafana/provisioning/dashboards/main.yaml
- type: bind
source: ./metrics/grafana/dashboards
target: /var/lib/grafana/dashboards
- type: volume
source: grafana_data
target: /var/lib/grafana
jaeger:
image: jaegertracing/all-in-one:1.37
restart: always
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 4002:16686
- 14250:14250
- 14268:14268
- 14269:14269
- 4317:4317 # OTLP gRPC
- 4318:4318 # OTLP HTTP
- 9411:9411
environment:
COLLECTOR_OTLP_ENABLED: "true"
COLLECTOR_ZIPKIN_HOST_PORT: "9411"
auth-hook:
image: ghcr.io/hasura/v3-dev-auth-webhook:latest
init: true
ports:
- 3050:3050
volumes:
prom_data:
grafana_data: