-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 2.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (68 loc) · 2.03 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
# Database servers for the XenSQL E2E suites (API + UI; see `task e2e:up`).
#
# Ports are intentionally non-default so this stack never collides with a local
# Postgres/MySQL you might already be running:
#
# PostgreSQL -> 55432
# MySQL -> 33306
# MariaDB -> 33307
#
# The Go API E2E tests read these same defaults from the environment, so once the
# stack is healthy you can run `task e2e:go` or `task e2e:ui`.
#
# task e2e:up # docker compose up -d --wait (or: COMPOSE="podman compose")
# task e2e:go # Go API suite (or: task e2e:go:all for one-shot)
# task e2e:ui # Playwright UI suite (or: task e2e:ui:all)
# task e2e:down
#
# Works with Docker Compose v2 and Podman. Healthchecks gate readiness so the
# suite (and `docker compose up --wait`) only start once each server accepts
# connections.
name: xensql-e2e
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: xensql_test
ports:
- "55432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d xensql_test"]
interval: 3s
timeout: 5s
retries: 20
tmpfs:
# Keep the data in RAM: faster, and nothing to clean up between runs.
- /var/lib/postgresql/data
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: xensql_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: xensql_test
ports:
- "33307:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 3s
timeout: 5s
retries: 30
tmpfs:
- /var/lib/mysql