-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
386 lines (359 loc) · 10.1 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
386 lines (359 loc) · 10.1 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
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
# For local testing use host.docker.internal to connect to host machine databases
services:
# ==========================================
# MySQL Family
# ==========================================
# MySQL 5.7 (Legacy)
# Platform: linux/amd64 required for Apple Silicon
mysql-57:
image: mysql:5.7
platform: linux/amd64
container_name: dbm-test-mysql-57
command: --skip-name-resolve
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
ports:
- "33357:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
# MySQL 8.0 (Current Standard)
mysql-8:
image: mysql:8.0
container_name: dbm-test-mysql-8
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
ports:
- "33380:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
# MySQL 9.1 (Innovation)
mysql-9:
image: mysql:9.1
container_name: dbm-test-mysql-9
# Removed deprecated authentication plugin flag for MySQL 9.1
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
ports:
- "33390:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
# ==========================================
# MariaDB Family
# ==========================================
# MariaDB 10 (Legacy Stable)
mariadb-10:
image: mariadb:10.11
container_name: dbm-test-mariadb-10
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
ports:
- "33310:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
timeout: 20s
retries: 10
# MariaDB 11 (Current Stable)
mariadb-11:
image: mariadb:11.4
container_name: dbm-test-mariadb-11
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
ports:
- "33311:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
timeout: 20s
retries: 10
# ==========================================
# PostgreSQL Family
# ==========================================
# Postgres 12
postgres-12:
image: postgres:12-alpine
container_name: dbm-test-pg-12
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54412:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# Postgres 13
postgres-13:
image: postgres:13-alpine
container_name: dbm-test-pg-13
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54413:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# Postgres 14
postgres-14:
image: postgres:14-alpine
container_name: dbm-test-pg-14
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54414:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# Postgres 15
postgres-15:
image: postgres:15-alpine
container_name: dbm-test-pg-15
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54415:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# Postgres 16
postgres-16:
image: postgres:16-alpine
container_name: dbm-test-pg-16
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54416:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# Postgres 17 (Latest Stable)
postgres-17:
image: postgres:17-alpine
container_name: dbm-test-pg-17
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
ports:
- "54417:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# ==========================================
# MongoDB Family
# ==========================================
# MongoDB 4.4 (Older Legacy)
mongo-4:
image: mongo:4.4
platform: linux/amd64
container_name: dbm-test-mongo-4
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: testdb
ports:
- "27704:27017"
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
# MongoDB 5.0
mongo-5:
image: mongo:5.0
container_name: dbm-test-mongo-5
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: testdb
ports:
- "27705:27017"
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
# MongoDB 6.0
mongo-6:
image: mongo:6.0
container_name: dbm-test-mongo-6
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: testdb
ports:
- "27706:27017"
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
# MongoDB 7.0
mongo-7:
image: mongo:7.0
container_name: dbm-test-mongo-7
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: testdb
ports:
- "27707:27017"
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
# MongoDB 8.0 (Latest)
mongo-8:
image: mongo:8.0
container_name: dbm-test-mongo-8
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: testdb
ports:
- "27708:27017"
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
# ==========================================
# Microsoft SQL Server Family
# ==========================================
# MSSQL 2019 (LTS)
# Platform: linux/amd64 required (no ARM support)
mssql-2019:
image: mcr.microsoft.com/mssql/server:2019-latest
platform: linux/amd64
container_name: dbm-test-mssql-2019
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "YourStrong!Passw0rd"
MSSQL_PID: "Express"
ports:
- "14339:1433"
volumes:
- /tmp:/var/opt/mssql/backup
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "YourStrong!Passw0rd" -Q "SELECT 1" -b -o /dev/null
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# MSSQL 2022 (Latest LTS)
# Platform: linux/amd64 required (no ARM support)
mssql-2022:
image: mcr.microsoft.com/mssql/server:2022-latest
platform: linux/amd64
container_name: dbm-test-mssql-2022
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "YourStrong!Passw0rd"
MSSQL_PID: "Express"
ports:
- "14342:1433"
volumes:
- /tmp:/var/opt/mssql/backup
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "YourStrong!Passw0rd" -Q "SELECT 1" -b -o /dev/null -C
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# Azure SQL Edge (ARM64 compatible - for M1/M2 Macs)
mssql-edge:
image: mcr.microsoft.com/azure-sql-edge:latest
container_name: dbm-test-mssql-edge
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "YourStrong!Passw0rd"
ports:
- "14350:1433"
volumes:
- /tmp:/var/opt/mssql/backup
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "YourStrong!Passw0rd" -Q "SELECT 1" -b -o /dev/null
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# ==========================================
# Redis Family
# ==========================================
# Redis 6 (LTS with ACL support)
redis-6:
image: redis:6-alpine
container_name: dbm-test-redis-6
command: redis-server --requirepass testpassword
ports:
- "63796:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "testpassword", "ping"]
interval: 5s
timeout: 5s
retries: 5
# Redis 7 (Previous Stable)
redis-7:
image: redis:7-alpine
container_name: dbm-test-redis-7
command: redis-server --requirepass testpassword
ports:
- "63797:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "testpassword", "ping"]
interval: 5s
timeout: 5s
retries: 5
# Redis 8 (Current Stable)
redis-8:
image: redis:8-alpine
container_name: dbm-test-redis-8
command: redis-server --requirepass testpassword
ports:
- "63798:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "testpassword", "ping"]
interval: 5s
timeout: 5s
retries: 5