-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (38 loc) · 1.33 KB
/
docker-compose.yml
File metadata and controls
39 lines (38 loc) · 1.33 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: rustango
POSTGRES_PASSWORD: rustango
POSTGRES_DB: rustango_test
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rustango -d rustango_test"]
interval: 2s
timeout: 2s
retries: 20
# MySQL 8.0+ test target. Mirrors the `postgres` service for symmetry.
# Live MySQL tests skip when MYSQL_TEST_URL is unset, so the suite
# stays green offline; CI / local devs run `docker compose up -d mysql`
# and `export MYSQL_TEST_URL=mysql://rustango:rustango@127.0.0.1:3406/rustango_test`
# to actually exercise the MySQL code paths.
#
# Port 3406 (not 3306) so it doesn't collide with a local MySQL.
# 8.0 is required for `FOR UPDATE SKIP LOCKED` (used by the jobs queue)
# and `JSON` column type. 8.0.19+ for `INSERT … ON CONFLICT DO NOTHING`
# (the framework uses `INSERT IGNORE` on MySQL which works on every 8.0).
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: rustango
MYSQL_DATABASE: rustango_test
MYSQL_USER: rustango
MYSQL_PASSWORD: rustango
ports:
- "3406:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "rustango", "-prustango"]
interval: 2s
timeout: 2s
retries: 30