Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (104 loc) · 3.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
108 lines (104 loc) · 3.88 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
services:
postgres:
image: postgres:11.8
ports:
- "5432:5432"
environment:
- POSTGRES_DB=test
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
volumes:
- ./target/testdata/pg/:/docker-entrypoint-initdb.d/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
oracle:
image: gvenzl/oracle-free:23-slim-faststart
ports:
- "1521:1521"
environment:
ORACLE_PASSWORD: test
volumes:
- ./target/testdata/oracle/:/grackle-initdb.d/
- ./modules/doobie-oracle/src/test/resources/scripts/:/container-entrypoint-initdb.d/
healthcheck:
test: bash -c "[ -f /tmp/healthy ]"
interval: 10s
timeout: 5s
retries: 10
start_period: 5s
start_interval: 5s
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- "1433:1433"
environment:
SA_PASSWORD: Test_123_Test
MSSQL_PID: Developer
ACCEPT_EULA: Y
MSSQL_TCP_PORT: 1433
volumes:
- ./target/testdata/mssql/:/grackle-initdb.d/
- ./modules/doobie-mssql/src/test/resources/scripts/:/container-entrypoint-initdb.d/
entrypoint: ["/bin/bash", "/container-entrypoint-initdb.d/entrypoint.sh"]
healthcheck:
test: bash -c "[ -f /tmp/healthy ]"
interval: 10s
timeout: 5s
retries: 10
start_period: 5s
start_interval: 5s
mysql:
# Defaults to the current LTS. The backend's documented floor is MySQL 8.0.14 (the first
# release with LATERAL); override to re-verify it, e.g.
# `MYSQL_VERSION=8.0.14 sbt doobiemysql/test` - green on 8.0.14, 8.0.46 and 8.4.
image: mysql:${MYSQL_VERSION:-8.4}
# initdb.d loads fixtures through the mysql CLI whose handshake may request latin1; force
# utf8mb4 for every session so fixture content can never be double-encoded.
# (--skip-character-set-client-handshake, the older way to pin this server-side, was
# removed in MySQL 8.3+; entrypoint.sh pins the client default instead - see its header
# comment for why that can't just be a bind-mounted conf.d file.)
command: ["--character-set-server=utf8mb4"]
entrypoint: ["/bin/bash", "/container-entrypoint-initdb.d/entrypoint.sh"]
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=test
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=test
volumes:
- ./target/testdata/mysql/:/docker-entrypoint-initdb.d/
- ./modules/doobie-mysql/src/test/resources/scripts/:/container-entrypoint-initdb.d/
healthcheck:
# mysqladmin ping answers during the image's temporary init server phase too; a real
# TCP query against the test schema only succeeds once init (and initdb.d) finished.
test: ["CMD-SHELL", "mysql -h127.0.0.1 -utest -ptest -e 'SELECT 1' test"]
interval: 5s
timeout: 5s
retries: 20
mariadb:
# The official image's `lts` tag always tracks MariaDB's current long-term-support
# release, so no version number needs to be pinned or re-pinned later. Override to test a
# specific version, e.g. `MARIADB_VERSION=11.4 sbt doobiemariadb/test`.
image: mariadb:${MARIADB_VERSION:-lts}
ports:
- "3307:3306"
environment:
- MARIADB_DATABASE=test
- MARIADB_USER=test
- MARIADB_PASSWORD=test
- MARIADB_ROOT_PASSWORD=test
volumes:
# Reuses the scripts generated for MySQL, verified by inspection to be plain standard
# SQL (CREATE TABLE/INSERT, nothing MySQL-8-exclusive). If a real incompatibility ever
# turns up, add a MariaDb dialect and a mariadb.sql to the datasets that need one,
# rather than forking all of them.
- ./target/testdata/mysql/:/docker-entrypoint-initdb.d/
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h127.0.0.1 -utest -ptest --silent"]
interval: 5s
timeout: 5s
retries: 20