Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (115 loc) · 3.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
122 lines (115 loc) · 3.47 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
# Databases for the E2E suites. Non-default ports, so they don't clash with a local Postgres or MySQL:
#
# PostgreSQL -> 55432
# MySQL -> 33306
# MariaDB -> 33307
# libSQL -> 38080 (sqld, the server Turso runs; HTTP)
# ClickHouse -> 38123 (HTTP)
# SQL Server -> 31433 (only with the mssql profile: BARSQL_E2E_MSSQL=1 for xtask)
#
# The tests use these ports and credentials unless BARSQL_E2E_PG_PORT and friends say otherwise.
#
# cargo xtask e2e up # COMPOSE="podman compose" for Podman
# cargo xtask e2e # driver, app and per-engine UI suites
# cargo xtask e2e down # or `cargo xtask e2e all` for up, run and down in one go
#
# `up --wait` returns once every healthcheck passes.
name: barsql-e2e
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: barsql_test
ports:
- "55432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d barsql_test"]
interval: 3s
timeout: 5s
retries: 20
tmpfs:
# tmpfs is faster and leaves nothing to clean up between runs.
- /var/lib/postgresql/data
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: barsql_test
ports:
- "33306:3306"
command:
- --default-authentication-plugin=mysql_native_password
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-proot"]
interval: 3s
timeout: 5s
retries: 30
tmpfs:
- /var/lib/mysql
mariadb:
image: mariadb:11
environment:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: barsql_test
ports:
- "33307:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 3s
timeout: 5s
retries: 30
tmpfs:
- /var/lib/mysql
turso:
image: ghcr.io/tursodatabase/libsql-server:latest
ports:
- "38080:8080"
healthcheck:
# The image has no curl, but bash can open a TCP connection.
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/8080"]
interval: 3s
timeout: 5s
retries: 30
tmpfs:
- /var/lib/sqld
clickhouse:
image: clickhouse/clickhouse-server:26.8
environment:
CLICKHOUSE_DB: barsql_test
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
ports:
- "38123:8123"
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test: ["CMD", "clickhouse", "client", "--password", "clickhouse", "-q", "SELECT 1"]
interval: 3s
timeout: 5s
retries: 40
tmpfs:
- /var/lib/clickhouse
# amd64 only, and big, so it starts only with the mssql profile. On arm64, xtask swaps in Azure SQL Edge, which runs
# the same engine natively. SQL Server can't keep its files on tmpfs.
mssql:
profiles: [mssql]
image: ${MSSQL_IMAGE:-mcr.microsoft.com/mssql/server:2022-latest}
platform: ${MSSQL_PLATFORM:-linux/amd64}
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: BarSQL-e2e-Passw0rd
MSSQL_PID: Developer
ports:
- "31433:1433"
healthcheck:
# Azure SQL Edge has no sqlcmd. The suites retry their first login while the server finishes starting.
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/1433"]
interval: 3s
timeout: 5s
retries: 40
start_period: 20s