-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
211 lines (201 loc) · 5.65 KB
/
docker-compose.test.yml
File metadata and controls
211 lines (201 loc) · 5.65 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
services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: sqlit-test-mssql
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "TestPassword123!"
MSSQL_PID: "Developer"
ports:
- "1434:1433"
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "TestPassword123!" -C -Q "SELECT 1" || exit 1
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
postgres:
image: postgres:16-alpine
container_name: sqlit-test-postgres
environment:
POSTGRES_USER: "testuser"
POSTGRES_PASSWORD: "TestPassword123!"
POSTGRES_DB: "test_sqlit"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d test_sqlit"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
tmpfs:
- /var/lib/postgresql/data
mysql:
image: mysql:8.0
container_name: sqlit-test-mysql
environment:
MYSQL_ROOT_PASSWORD: "TestPassword123!"
MYSQL_USER: "testuser"
MYSQL_PASSWORD: "TestPassword123!"
MYSQL_DATABASE: "test_sqlit"
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "testuser", "-pTestPassword123!"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
tmpfs:
- /var/lib/mysql
clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: sqlit-test-clickhouse
environment:
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: "TestPassword123!"
ports:
- "8123:8123"
tmpfs:
- /var/lib/clickhouse
oracle:
image: gvenzl/oracle-free:23-slim
container_name: sqlit-test-oracle
environment:
ORACLE_PASSWORD: "TestPassword123!"
APP_USER: "testuser"
APP_USER_PASSWORD: "TestPassword123!"
ports:
- "1521:1521"
healthcheck:
test: ["CMD", "healthcheck.sh"]
interval: 10s
timeout: 5s
retries: 20
start_period: 60s
mariadb:
image: mariadb:11
container_name: sqlit-test-mariadb
environment:
MARIADB_ROOT_PASSWORD: "TestPassword123!"
MARIADB_USER: "testuser"
MARIADB_PASSWORD: "TestPassword123!"
MARIADB_DATABASE: "test_sqlit"
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
tmpfs:
- /var/lib/mysql
cockroachdb:
image: cockroachdb/cockroach:latest
container_name: sqlit-test-cockroachdb
command: start-single-node --insecure
ports:
- "26257:26257"
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 5s
timeout: 5s
retries: 10
start_period: 20s
turso:
image: ghcr.io/tursodatabase/libsql-server:latest
container_name: sqlit-test-turso
ports:
- "8081:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
firebird:
image: firebirdsql/firebird:5.0.3-noble
container_name: sqlit-test-firebird
environment:
FIREBIRD_USER: "testuser"
FIREBIRD_PASSWORD: "TestPassword123!"
FIREBIRD_DATABASE: "/var/lib/firebird/data/test_sqlit.fdb"
ports:
- "3050:3050"
healthcheck:
# Firebird doesn't come with a straightforward health check, but this
# ought to be enough, I hope...
test: ["CMD", "nc", "-vz", "localhost", "3050"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
tmpfs:
- /var/lib/firebird/data
# SSH server for testing SSH tunnel connections
# Connects to postgres container on docker network
ssh:
image: linuxserver/openssh-server:latest
container_name: sqlit-test-ssh
environment:
PUID: 1000
PGID: 1000
USER_NAME: testuser
USER_PASSWORD: testpass
PASSWORD_ACCESS: "true"
# Enable TCP forwarding for SSH tunnels
DOCKER_MODS: "linuxserver/mods:openssh-server-ssh-tunnel"
ports:
- "2222:2222"
volumes:
- ../../tests/fixtures/99-fix-sshd-config.sh:/custom-cont-init.d/99-fix-sshd-config
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2222"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
depends_on:
- postgres-ssh
# PostgreSQL for SSH tunnel tests (separate instance accessible via SSH)
postgres-ssh:
image: postgres:16-alpine
container_name: sqlit-test-postgres-ssh
environment:
POSTGRES_USER: "testuser"
POSTGRES_PASSWORD: "TestPassword123!"
POSTGRES_DB: "test_sqlit"
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d test_sqlit"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
tmpfs:
- /var/lib/postgresql/data
miniflare:
build:
context: ../../tests/fixtures/d1
container_name: sqlit-test-miniflare
command: ["wrangler", "dev", "--local", "--ip", "0.0.0.0", "--port", "8787"]
environment:
D1_ACCOUNT_ID: "test-account"
D1_API_TOKEN: "test-token"
D1_DATABASE: "test-d1"
ports:
- "8787:8787"
volumes:
- ../../tests/fixtures/d1/wrangler.toml:/app/wrangler.toml
- ../../tests/fixtures/d1/index.js:/app/index.js
working_dir: /app
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:8787/').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s