forked from Maxteabag/sqlit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
158 lines (151 loc) · 4.1 KB
/
docker-compose.test.yml
File metadata and controls
158 lines (151 loc) · 4.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
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
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
# 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