-
Notifications
You must be signed in to change notification settings - Fork 234
/
docker-compose.yml
515 lines (479 loc) Β· 12.8 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
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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
version: '3'
services:
cockroach_23_1:
image: prismagraphql/cockroachdb-custom:23.1@sha256:c5a97355d56a7692ed34d835dfd8e3663d642219ea90736658a24840ea26862d
restart: unless-stopped
command: |
start-single-node --insecure
ports:
- '26260:26257'
networks:
- databases
cockroach_22_2:
image: prismagraphql/cockroachdb-custom:22.2
restart: unless-stopped
command: start-single-node --insecure
ports:
- '26259:26257'
networks:
- databases
cockroach_22_1_0:
image: prismagraphql/cockroachdb-custom:22.1.0
restart: unless-stopped
command: start-single-node --insecure
ports:
- '26257:26257'
networks:
- databases
cockroach_21_2_0_patched:
image: prismagraphql/cockroachdb-custom:21.2.0-patched
restart: unless-stopped
command: start-single-node --insecure
ports:
- '26258:26257'
networks:
- databases
pgbouncer:
image: brainsam/pgbouncer:latest
restart: unless-stopped
environment:
DB_HOST: 'postgres11'
DB_PORT: '5432'
DB_USER: 'postgres'
DB_PASSWORD: 'prisma'
POOL_MODE: 'transaction'
MAX_CLIENT_CONN: '1000'
networks:
- databases
ports:
- '6432:6432'
postgres9:
image: postgres:9.6
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
ports:
- '5431:5432'
networks:
- databases
postgres10:
image: postgres:10
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
ports:
- '5432:5432'
networks:
- databases
postgres11:
image: postgres:11
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
ports:
- '5433:5432'
networks:
- databases
postgres12:
image: postgres:12
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
ports:
- '5434:5432'
networks:
- databases
postgres13:
image: postgres:13
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
ports:
- '5435:5432'
networks:
- databases
neon-proxy:
image: ghcr.io/neondatabase/wsproxy:latest
restart: unless-stopped
environment:
# the port of the postgres13 within the databases network
APPEND_PORT: 'postgres13:5432'
ALLOW_ADDR_REGEX: '.*'
LOG_TRAFFIC: 'true'
LOG_CONN_INFO: 'true'
ports:
- '5488:80'
depends_on:
- postgres13
networks:
- databases
# Tests using a vitess backend were not running properly for query-engine tests, and In
# https://github.com/prisma/prisma-engines/pull/4423 work was done to have coverage of the correctness of planetscale
# driver adapters.
#
# Given these tests run against the planetscale proxy, and given a different test suite will exist for vitess with
# rust drivers, we opted for the path of least friction when running the driver adapter tests, which is putting a
# single mysql box behind the planetscale proxy instead of full vttest cluster.
#
# The tradeoffs are:
#
# - we don't exercise vitess but mysql. This is a close approximation, but there might be small differences in
# behavior. (ex. vttest can be returning different error messages than mysql)
#
# - however, we 1) do exercise the planetscale proxy, 2) we use relationMode=prisma and this resembles what actually
# happens within the query engine, where vitess does not exist as a provider, and as such there isn't any particular
# capability or conditional code making the engine behave differently then when using Mysql.
# In the end Vitess is just an abstraction existing in the test kit to a) use the mysql provider, b) run the suite
# with relationMode=prisma; c) being able to run or exclude specific tests for that configuration. But the existence
# of this testing connector is misleading, and it should probably be just a version of the MySQL testing connector
# instead.
planetscale-proxy:
build: ./docker/planetscale_proxy
environment:
MYSQL_HOST: 'mysql-planetscale'
MYSQL_PORT: 3306
MYSQL_DATABASE: prisma
ports:
- '8085:8085'
depends_on:
mysql-planetscale:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ['CMD', 'nc', '-z', '127.0.0.1', '8085']
interval: 5s
timeout: 2s
retries: 20
networks:
- databases
mysql-planetscale:
image: mysql:8.0.28
command: mysqld
restart: unless-stopped
platform: linux/x86_64
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: prisma
ports:
- '3310:3306'
networks:
- databases
tmpfs: /var/lib/planetscale-mysql
volumes:
- './docker/planetscale-mysql/my.cnf:/etc/mysql/my.cnf'
ulimits:
nofile:
soft: 20000
hard: 40000
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 10
postgres14:
image: postgres:14
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
POSTGRES_HOST_AUTH_METHOD: 'md5'
POSTGRES_INITDB_ARGS: '--auth-host=md5'
ports:
- '5437:5432'
networks:
- databases
postgres15:
image: postgres:15
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
POSTGRES_HOST_AUTH_METHOD: 'md5'
POSTGRES_INITDB_ARGS: '--auth-host=md5'
ports:
- '5438:5432'
networks:
- databases
postgres16:
image: postgres:16
restart: unless-stopped
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_PASSWORD: 'prisma'
POSTGRES_HOST_AUTH_METHOD: 'md5'
POSTGRES_INITDB_ARGS: '--auth-host=md5'
ports:
- '5439:5432'
networks:
- databases
mysql-5-6:
image: mysql:5.6.50
command: mysqld --table_definition_cache=2000
restart: unless-stopped
platform: linux/x86_64
environment:
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: prisma
MYSQL_DATABASE: prisma
ports:
- '3309:3306'
networks:
- databases
tmpfs: /var/lib/mysql
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 10
mysql-5-7:
image: mysql:5.7.44
command: mysqld
restart: unless-stopped
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: prisma
MYSQL_DATABASE: prisma
ports:
- '3306:3306'
networks:
- databases
tmpfs: /var/lib/mysql
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 10
mysql-8-0:
image: mysql:8.0.28
command: mysqld
restart: unless-stopped
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: prisma
MYSQL_DATABASE: prisma
ports:
- '3307:3306'
networks:
- databases
tmpfs: /var/lib/mysql8
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 10
mariadb-10-0:
image: mariadb:10
restart: unless-stopped
environment:
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: prisma
MYSQL_DATABASE: prisma
ports:
- '3308:3306'
networks:
- databases
tmpfs: /var/lib/mariadb
mariadb-11-0:
image: mariadb:11
restart: unless-stopped
environment:
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: prisma
MYSQL_DATABASE: prisma
ports:
- '3308:3306'
networks:
- databases
tmpfs: /var/lib/mariadb
vitess-test-8_0:
image: vitess/vttestserver:mysql80@sha256:53a2d2f58ecf8e6cf984c725612f7651c4fc7ac9bc7d198dbd9964d50e28b9a2
restart: unless-stopped
ports:
- 33807:33807
environment:
PORT: 33804
KEYSPACES: 'test'
NUM_SHARDS: '1'
MYSQL_BIND_HOST: '0.0.0.0'
FOREIGN_KEY_MODE: 'disallow'
ENABLE_ONLINE_DDL: false
MYSQL_MAX_CONNECTIONS: 100000
TABLET_REFRESH_INTERVAL: '100ms'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h127.0.0.1', '-P33807']
interval: 5s
timeout: 2s
retries: 20
vitess-shadow-8_0:
image: vitess/vttestserver:mysql80@sha256:53a2d2f58ecf8e6cf984c725612f7651c4fc7ac9bc7d198dbd9964d50e28b9a2
restart: unless-stopped
ports:
- 33808:33807
environment:
PORT: 33804
KEYSPACES: 'shadow'
NUM_SHARDS: '1'
MYSQL_BIND_HOST: '0.0.0.0'
FOREIGN_KEY_MODE: 'disallow'
ENABLE_ONLINE_DDL: false
MYSQL_MAX_CONNECTIONS: 100000
TABLET_REFRESH_INTERVAL: '500ms'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h127.0.0.1', '-P33807']
interval: 5s
timeout: 2s
retries: 20
mssql-2017:
image: mcr.microsoft.com/mssql/server:2017-latest
restart: unless-stopped
environment:
ACCEPT_EULA: 'Y'
SA_PASSWORD: '<YourStrong@Passw0rd>'
ports:
- '1434:1433'
networks:
- databases
mssql-2019:
image: mcr.microsoft.com/mssql/server:2019-latest
restart: unless-stopped
environment:
ACCEPT_EULA: 'Y'
SA_PASSWORD: '<YourStrong@Passw0rd>'
ports:
- '1433:1433'
networks:
- databases
mssql-2022:
image: mcr.microsoft.com/mssql/server:2022-latest
restart: unless-stopped
environment:
ACCEPT_EULA: 'Y'
SA_PASSWORD: '<YourStrong@Passw0rd>'
ports:
- '1435:1433'
networks:
- databases
azure-edge:
image: mcr.microsoft.com/azure-sql-edge
restart: unless-stopped
environment:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: '<YourStrong@Passw0rd>'
ports:
- '1433:1433'
networks:
- databases
mongo42:
image: prismagraphql/mongo-single-replica:4.2.17-bionic
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
MONGO_PORT: 27016
INIT_WAIT_SEC: $INIT_WAIT_SEC
networks:
- databases
ports:
- '27016:27016'
mongo44:
image: prismagraphql/mongo-single-replica:4.4.3-bionic
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
INIT_WAIT_SEC: $INIT_WAIT_SEC
ports:
- '27017:27017'
networks:
- databases
mongo42-single:
image: mongo:4.2
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
INIT_WAIT_SEC: $INIT_WAIT_SEC
ports:
- '27016:27017'
networks:
- databases
mongo44-single:
image: mongo:4.4
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
INIT_WAIT_SEC: $INIT_WAIT_SEC
ports:
- '27017:27017'
networks:
- databases
mongo5:
image: prismagraphql/mongo-single-replica:5.0.3
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
MONGO_PORT: 27018
INIT_WAIT_SEC: $INIT_WAIT_SEC
ports:
- '27018:27018'
networks:
- databases
mongo5-single:
image: mongo:5
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
MONGO_INITDB_ROOT_PASSWORD: 'prisma'
INIT_WAIT_SEC: $INIT_WAIT_SEC
ports:
- '27018:27017'
networks:
- databases
mongo-express:
image: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: 'prisma'
ME_CONFIG_MONGODB_ADMINPASSWORD: 'prisma'
ME_CONFIG_MONGODB_URL: mongodb://prisma:prisma@mongo4-single:27017/
networks:
- databases
otel:
image: jaegertracing/all-in-one:1.35
restart: unless-stopped
environment:
COLLECTOR_OTLP_ENABLED: 'true'
COLLECTOR_ZIPKIN_HOST_PORT: ':9411'
ports:
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 4317:4317
- 4318:4318
- 14250:14250
- 14268:14268
- 14269:14269
- 9411:9411
prometheus:
image: prom/prometheus
restart: unless-stopped
volumes:
- ${PWD}/metrics/prometheus:/prometheus-data
command: --config.file=/prometheus-data/prometheus.yml
ports:
- 9090:9090
grafana:
image: grafana/grafana
volumes:
- ${PWD}/metrics/grafana/datasources:/etc/grafana/provisioning/datasources/
- ${PWD}/metrics/grafana/dashboards:/etc/grafana/provisioning/dashboards/
ports:
- 3000:3000
networks:
databases: null